Quantcast
Channel: BugNET Issue Tracker (Moved to GitHub)
Viewing all articles
Browse latest Browse all 2179

Commented Issue: Log4Net doesn't log [148]

$
0
0
I fixed the problem, at least for my case. Please take note of this because you may want to update the code base.

In global.asax.cs:

protected void Application_Start(object sender, EventArgs e)
{
Log.Info("Application Start");
}

This solved the problem because it initializes the Logger as early as possible (instead of later in Application_BeginRequest()).

Here's a link to the [faq](http://logging.apache.org/log4net/release/faq.html#log-early). Check out the section on not logging in release mode (which appeared to be my problem, but only on my server and not in my dev environment).
Comments: Was this included in release 1.5.265? I don't see it in the repository. Anyway I was able to solve this without modifying the source by using the following configuration change: ``` <appSettings> <clear /> <add key="log4net.Config" value="log4net.config"/> <add key="log4net.Config.Watch" value="True"/> </appSettings> ``` More information available here: [http://logging.apache.org/log4net/release/manual/configuration.html#appSettings](http://www.example.com)

Viewing all articles
Browse latest Browse all 2179

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>