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 4605430
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:25:52+00:00 2026-05-22T00:25:52+00:00

Situation is that level of log4net is configured as ‘Error’ but there is some

  • 0

Situation is that level of log4net is configured as ‘Error’ but there is some information i need to write under a ‘no matter what’ condition
for example

“loggin has started”
if only ‘Error’ or ‘Fatal’ is enabled i cant log this in Error or Fatal since its just information

so is there any way i can do that other than change the level of the logger to info, write the log and then change back the level because that will act just like a workaround not a solution

and without using Headers since they only come at the beginning

EDIT: In an Appender

StringMatchFilter stringFilter = new StringMatchFilter();
stringFilter.AcceptOnMatch = true;
stringFilter.StringToMatch = "successfully";
stringFilter.ActivateOptions();
appender.AddFilter(stringFilter);

DenyAllFilter deny = new DenyAllFilter();
deny.ActivateOptions();
appender.AddFilter(deny);

adding to an appender and setting level ‘All’ to the root and managing levels in appenders but still i am unable to write any message containing ‘successfully’
but please note when i set appender level to info the filter begins to work

  • 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-22T00:25:52+00:00Added an answer on May 22, 2026 at 12:25 am

    I assume this is all because you don’t like the idea of using .FatalFormat when it is not really an error.

    I’m not sure how you would do this programatically, but if you were using a config file you add a section like

        <logger name="ALWAYS">
            <level value="DEBUG" />
            appender-ref ref="RollingFileAppender" />
        </logger>
    

    which means you can log your messages like

       log4net.LogManager.GetLogger("Always").InfoFormat( ... );
    

    or you could create a static

       static readonly log4net.ILog alwaysLogger  = log4net.LogManager.GetLogger("Always");
    

    and log via.

       alwaysLogger.InfoFormat(....);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in this situation that i need a list of lists. for instance i
I am in kind of situation that I need to start with a tab
I have a situation where I need to access an object that has been
I'm working in a C/C++ mixed project that has the following situation. I need
I'm in a situation where I need to display a tree. However some of
Considering the situation below, I need to get all of the bottom class level
I am in a situation where I need to find out the level of
I'm designing a game, but this question is applicable to any situation that requires
I want to utilise some form of simple encryption that is reasonably secure but
Here's the situation: I've got a two level tree that I'm displaying in a

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.