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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:46:51+00:00 2026-06-07T03:46:51+00:00

My application uses Log4net to write to the event viewer. Here’s the log4net section

  • 0

My application uses Log4net to write to the event viewer. Here’s the log4net section of my program’s App.config file:

<log4net>
    <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
        <applicationName value="CarSystem" />
        <logName value="CarSystemLog" />
        <threshold value="DEBUG" />
        <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
        </layout>
    </appender>
    <root>
        <level value="DEBUG" />
        <appender-ref ref="EventLogAppender" />
    </root>
</log4net> 

Now, these settings were working fine up until about 12:30 pm the day before yesterday. Suddenly, (just when I need to review the messages in the log, of course) it stopped writing to the log file.

The custom event log is in the viewer. I’ve rebooted the machine today, but still nothing new is going into the log. I increased the maximum log size to 10880 KB.

Why isn’t log4net writing to my log file any more?

  • 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-06-07T03:46:53+00:00Added an answer on June 7, 2026 at 3:46 am

    I went back to the Log4Net documentation and noticed this statement:

    it is imperative to make a logging call as early as possible during the application start-up, and certainly before any external assemblies have been loaded and invoked.

    Well, I had the XmlConfiguration attribute in my AssemblyInfo.cs and a call to LogManager.GetLogger in the code, but it was after a call to start a monitoring object I had added to the constructor of my WPF applicaton’s App object. I realized that the logging stopped after I had added this call when I read this statement and reviewed the code.

    So I moved the call to LogManager.GetLogger to be the very first statement in the App constructor and the logging began again. Hallelieuia!

    Thanks for the help and suggestions.

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

Sidebar

Related Questions

my application uses the standard app.config to store the public configuration data. However, there
my application uses libjpeg to read/write JPEG-images. everything worked fine recently my app started
My application uses a 3rd party dll. If I remove myapp.exe.local file from my
My boss is asking me to develop a demo application that uses log4net for
Our application uses a XML configuation file. I thought that it would be nice
I've previously used log4net, but my current employer uses Enterprise Library application blocks. I
My application uses a settings file settings.txt to save the currently set values of
My application uses a TButtonGroup control. I assign to each button an event handler:
I have a C#.NET 4.0 app that uses log4net for logging. Under Windows XP,
I have a application which uses .net Thread-pool to have multiple threads.It uses log4net

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.