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

  • Home
  • SEARCH
  • 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 147773

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:50:25+00:00 2026-05-11T08:50:25+00:00

I’m working on setting up log4net in a multi-tiered application. I have most of

  • 0

I’m working on setting up log4net in a multi-tiered application. I have most of my logging set up as desired, but now I’m trying to get the <logger> entries in .config set up in a way to allow maximum flexibility on the levels being output.

My logger naming convention goes something like:
ExecutableName.WorkerThreadName.[ExternalModuleName(s)].ClassName

My current logger definition section in the .config file looks something like:

<root>   <level value='DEBUG' />   <appender-ref ref='MyAppender' /> </root>  <logger name = 'ExecutableName'>   <level value='FATAL' />    </logger>  <logger name = 'ExecutableName.WorkerThreadName'>   <level value='OFF' />      </logger>  <logger name = 'ExecutableName.WorkerThreadName.ClassName'>   <level value='INFO' />         </logger> <!--repeat as necessary---> 

Hopefully you get the idea… It seem like this has the potential to explode into a mess of hard to maintain entries (especially when the app reaches a support phase).
Any suggestions on how to best manage the level definitions for the nested loggers?
I’ve played around a bit with actually nesting the xml statements, but that doesn’t seem to work.

  • 0 0 Answers
  • 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. 2026-05-11T08:50:25+00:00Added an answer on May 11, 2026 at 8:50 am

    Generally I want to catch all messages, at least WARNings and severe levels. Since loggers inherit their level from loggers higher in the hierarchy and ultimately from the root logger, I assign levels only to the top-level loggers. In your case that would be the ‘ExecutableName’ loggers.

    For those special case loggers from which I’m e.g. not interested in seeing other than FATAL messages I will add a specific level setting. But this is usually not the general case and will thus be of manageable size.

    I find it useful to set e.g. WARN or INFO at those top-level loggers and then use appenders with filters on the various levels. The result is that the potentially vast amount of messages get grouped into different storages depending on level. You could even have separate appenders for each top-level logger to get even more fine grained control over the message stream.

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

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.