Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7417447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:42:13+00:00 2026-05-29T07:42:13+00:00

I am using log4net DebugAppender (or TraceAppender). I have configured the appender like this:

  • 0

I am using log4net DebugAppender (or TraceAppender). I have configured the appender like this:

<appender name="DebugAppender" type="log4net.Appender.DebugAppender">
    <immediateFlush value="true" />
        <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%level %message%newline" />
    </layout>
</appender>

Loggers in the code are declared in the usual per-class manner:

private static readonly ILog Log = 
    LogManager.GetLogger(typeof(TradingApiRouteCollectionExtensions));

Output in the Output windows looks like this:

Acme.Common.Configuration.TradingApiRouteCollectionExtensions: DEBUG Registering route prefix ‘session’ for service Acme.Session.SessionService
Acme.Common.Configuration.TradingApiRouteCollectionExtensions: DEBUG Web methods found for type Acme.Session.SessionService:
Acme.Common.Configuration.TradingApiRouteCollectionExtensions: DEBUG session/

Notice how every line starts with the logger type name. I want to suppress this as I didn’t ask for it in the configuration and I don’t want it. I can’t see any obvious way to do this. Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:42:14+00:00Added an answer on May 29, 2026 at 7:42 am

    You need to create your own appender. The one you are using does the following:

    System.Diagnostics.Debug.Write(RenderLoggingEvent(loggingEvent), loggingEvent.LoggerName);
    if (!this.m_immediateFlush)
        return;
    System.Diagnostics.Debug.Flush();
    

    Therefore you always end up with the class (logger) name in the output window. You can derive from the log4net Debug appender and override the Append method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using log4net and have completely setup it up with param name=File value=
I'm using log4Net for my logging. I also have the following set... <log4net debug=true>
I have an asynchronous socket listener class like this: using System; using System.Collections.Generic; using
Using log4net we would like to log all calls to our ASP.NET MVC controller
I am using log4net to log to the console, and the %date conversionPattern value
I am using log4net and in one class require logging to a RollingFile appender,
I'm using log4net and I configured my XML file to log into database with
I have been using Log4Net for several months, and I create a new Logger
We have been using log4net for logging our asp.net web forms application. Our logging
I have been told to add logging to my code using log4net, the problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.