非常简单的问题 - >我似乎无法在我的ASP.NET应用程序中从Log4Net获取任何数据.我有一个简单的ASP.NET网站,它引用了一个类库.在这个类库中,我有一些调用记录器的行.
我正在尝试在Visual Studio 2008调试输出窗口中读取log4net输出数据.
这是我的代码和我的配置......
//Class Library project
//File: Foo.cs
public class FooService
{
private static readonly ILog log = LogManager.GetLogger(typeof(FooService));
public FooService()
{
// NOTE: To play with my L4N settings, I'll call Debug once, then Info once.
log.Info("Starting Constructor");
// ... snip ...
log.Debug("Leaving Constructor");
}
}
// ASP.NET Website project
// File: global.asax
void Application_Start(object sender, EventArgs eventArgs)
{
log4net.Config.XmlConfigurator.Configure();
}
// File: Whatever.aspx.cs
// A delegate method (when a user clicks …Run Code Online (Sandbox Code Playgroud)