|
Dear Michael, I've tried to define an EventLogAppender as shown bellow, but still nothing happens. I may have a bigger problem ;-) In the Solution Explorer view, I can see the Bin directory with the log4net.dll inside, so for me it looks good. If I use an external config file for log4net, where do I tell my application to use it? Thanx Samuel web.config: <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <!-- Register a section handler for the log4net section --> <configSections> <section name="log4net" type="System.Configuration.IgnoreSectionHandler" /> </configSections> <appSettings> </appSettings> <!-- This section contains the log4net configuration settings --> <log4net> <!-- Define some output appenders --> <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" > <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /> </layout> </appender> <appender name="A1" type="log4net.Appender.RollingFileAppender"> <file value="C:\Dev\Test\log\log.txt" /> <appendToFile value="true" /> <maxSizeRollBackups value="10" /> <maximumFileSize value="1024KB" /> <rollingStyle value="Size" /> <staticLogFileName value="true" /> <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> <logger name="com.mypackage.test" > <level value="DEBUG" /> <appender-ref ref="EventLogAppender" /> </logger> </log4net> Michael Schall escribió: Are any of the other appenders working(EventViewer, Console)? If not are you configuring log4net? I see you have your configuration in your web config file. We don't do it this way. --
|
- no log file is created Samuel Rochas
- Re: no log file is created Michael Schall
- Re: no log file is created Samuel Rochas
- Re: no log file is created Michael Schall
- Re: no log file is created Samuel Rochas
- Re: no log file is created Michael Schall
- Re: no log file is created Samuel Rochas
- Re: no log file is create... Alvaro Rozo
- Re: no log file is create... Samuel Rochas
- Re: no log file is create... Alvaro Rozo
- Unsubcribe Khalid, Amer
- Unsubcribe Joe Waldner
- Unsubcribe pradeep yanamandra
- Re: Unsubcribe Erik Brooks
- Re: no log file is create... Michael Schall
- Re: no log file is created Ron Grabowski
- Re: no log file is created Ron Grabowski
