logo       

Re: log4net -- Is it the best?: msg#00138

windows.devel.dotnet.web

Subject: Re: log4net -- Is it the best?

Here is the work from the EntLib 2.0 lead at Microsoft.

http://weblogs.asp.net/scottdensmore/archive/2005/01/28/362404.aspx

> -----Original Message-----
> From: Discussion of building .NET applications targeted for
> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Jeff
> Sent: 01/28/2005 11:44 AM
> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [DOTNET-WEB] log4net -- Is it the best?
>
> Hmm... so going to that site it looks like you can download
> the chm documentation but that's it. Anyone with closer ties
> to MS know if they will indeed be releasing this soon? If
> so, I will just wait to implement my exception management
> part of my app until that time.
>
> Thanks.
>
> -----Original Message-----
> From: Discussion of building .NET applications targeted for
> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> Barry Allison
> Sent: Friday, January 28, 2005 9:09 AM
> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [DOTNET-WEB] log4net -- Is it the best?
>
> Enterprise Library is part of the MS patterns and practices
> initiative:
> http://www.microsoft.com/resources/practices/comingsoon.mspx
>
> It is rumoured to be released today but I haven't seen anything yet.
> In the meantime you can look at some of the "pre-release"
> documentation
> http://www.gotdotnet.com/workspaces/workspace.aspx?id=295a464a
> -6072-4e25
> -94e2-91be63527327
>
> (watch out for line wrap in the urls)
>
> Barry Allison.
>
> -----Original Message-----
> From: Discussion of building .NET applications targeted for
> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Jeff
> Sent: 28 January 2005 16:00
> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [DOTNET-WEB] log4net -- Is it the best?
>
> Where is this enterprise framework?
>
> -----Original Message-----
> From: Discussion of building .NET applications targeted for
> the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> Stephen Patten
> Sent: Friday, January 28, 2005 8:27 AM
> To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [DOTNET-WEB] log4net -- Is it the best?
>
> I've used it right out of the box on quite a few projects
> that are in production...error free. There is a new
> Enterprise Framwork from MS that you might want to test out
> too, matter of fact today is the release day :)
>
> stephen
>
>
> On Fri, 28 Jan 2005 10:09:57 -0500, Jeremy Lew <jlew@xxxxxxxxxxxx>
> wrote:
> > Speaking of log4net, I would like to choose one of the free logging
> > frameworks for use in a commercial ASP.NET app. Is log4net well
> > regarded, are there any other choices which I might consider?
> >
> > Thanks,
> > Jeremy
> >
> > -----Original Message-----
> > From: Discussion of building .NET applications targeted for the Web
> > [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Stephen Patten
> > Sent: Friday, January 28, 2005 1:18 AM
> > To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> > Subject: Re: [DOTNET-WEB] log4net
> >
> > <appender name="SmtpAppender"
> > type="log4net.Appender.SmtpAppender">
> > <param name="To" value="STEPHEN@PATTEN" />
> > <param name="From"
> value="PatriotProtector@xxxxxxx" />
> > <param name="Subject" value="logging message" />
> > <param name="BufferSize" value="512" />
> > <param name="SMTPHost" value="YOURMAILSERVER" />
> > <param name="Lossy" value="false" />
> > <param name="LocationInfo" value="true" />
> > <filter type="log4net.Filter.LevelMatchFilter">
> > <param name="LevelToMatch" value="FATAL" />
> > </filter>
> > <layout type="log4net.Layout.PatternLayout">
> > <conversionPattern
> > value="%d{yyyMMdd:HHmmss.fffff} [%t] %-5p %c %x - %m%n" />
> > </layout>
> > </appender>
> >
> > <!-- Setup the root category, add the appenders and set the
> > default level -->
> > <root>
> > <level value="ALL" />
> > <appender-ref ref="FileAppender" />
> > <!-- <appender-ref
> ref="ConsoleAppender" />
> > -->
> > <appender-ref ref="SmtpAppender" />
> > </root>
> > </log4net>
> >
> > On Thu, 27 Jan 2005 21:48:43 -0800, jeff hughes
> <jj@xxxxxxxxxxxxxxxx>
> > wrote:
> > > Here is what I use for logging with log4net. This includes the
> > remoting
> > > appender configuration and SMTP server.
> > >
> > > HTH
> > > JJ
> > >
> > > <!-- log 4 net configuration settings -->
> > >
> > > <configSections>
> > > <section name="log4net"
> > > type="log4net.Config.Log4NetConfigurationSectionHandler"/>
> > > </configSections>
> > >
> > > <log4net debug="false">
> > >
> > > <!--
> > > ******************************** SMTP Appender
> > > ***************************
> > > -->
> > >
> > > <appender name="SMTPAppender"
> > > type="log4net.Appender.SMTPAppender">
> > >
> > > <!--
> > > this filter will only log events that are
> > > between and include
> > > LevelMin and LevelMax
> > > -->
> > >
> > > <filter
> > type="log4net.Filter.LevelRangeFilter">
> > > <param name="LevelMin"
> value="WARN"/>
> > > <param name="LevelMax"
> value="FATAL"/>
> > > </filter>
> > >
> > > <!-- semi colon delimited to addressee -->
> > > <param name="To" value=""/>
> > > <param name="From" value="<user@domain>"/>
> > > <param name="Subject" value="test logging
> > > message"/>
> > > <param name="SMTPHost" value="<SMTP
> > > SERVERNAME>"/>
> > > <param name="LocationInfo" value="false"/>
> > > <param name="BufferSize" value="512"/>
> > > <param name="Lossy" value="true"/>
> > > <evaluator
> type="log4net.spi.LevelEvaluator">
> > > <param name="Threshold"
> value="WARN"/>
> > > </evaluator>
> > > <layout
> type="log4net.Layout.PatternLayout">
> > > <param name="ConversionPattern"
> > > value="%n%d [%t] %-5p %c [%x] - %m%n%n%n"/>
> > > </layout>
> > > </appender>
> > >
> > > <!--
> > > **************************** Remoting Appender
> > > ***************************
> > > -->
> > >
> > > <appender name="RemotingAppender"
> > > type="log4net.Appender.RemotingAppender">
> > >
> > > <!--
> > > this filter will only log events that are
> > > between and include
> > > LevelMin and LevelMax
> > > -->
> > >
> > > <filter
> > type="log4net.Filter.LevelRangeFilter">
> > > <param name="LevelMin"
> value="DEBUG"/>
> > > <param name="LevelMax"
> value="FATAL"/>
> > > </filter>
> > >
> > > <param name="Sink"
> > > value="tcp://<server>:<port>/LoggingSink"/>
> > > <param name="Lossy" value="false"/>
> > > <evaluator
> type="log4net.spi.LevelEvaluator">
> > > <param name="Threshold"
> > value="DEBUG"/>
> > > </evaluator>
> > > <param name="BufferSize" value="95"/>
> > > <param name="OnlyFixPartialEventData"
> > > value="true"/>
> > > </appender>
> > >
> > > <root>
> > > <!--
> > > ALL
> > > DEBUG
> > > INFO
> > > WARN
> > > ERROR
> > > FATAL
> > > OFF
> > > -->
> > > <priority value="ALL"/>
> > > <appender-ref ref="SMTPAppender"/>
> > > <appender-ref ref="RemotingAppender"/>
> > >
> > > </root>
> > >
> > > <!--logger name="SendEmail">
> > > <level value="WARN" />
> > > <appender-ref ref="SMTPAppender" />
> > > </logger>
> > >
> > > <logger name="RemoteLogger">
> > > <level value="DEBUG" />
> > > <appender-ref ref="RemotingAppender" />
> > > </logger-->
> > >
> > > </log4net>
> > >
> > > -----Original Message-----
> > > From: Discussion of building .NET applications targeted
> for the Web
> > > [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of Jeff
> > > Sent: Thursday, January 27, 2005 10:16 PM
> > > To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx
> > > Subject: [DOTNET-WEB] log4net
> > >
> > > Anyone get this to work for the fileappender and the smtpappender?
> I
> > > can't
> > > get any emails to get sent out. I have tried several
> configurations
> > and
> > > nothing is working, what am I doing wrong here? I stepped through
> the
> > > code,
> > > and it does not even hit the SmtpAppender class. I am
> about to give
> > up
> > > here. I originally thought it was because that class uses
> > > system.web.mail and I don't have smtp service setup on
> the server,
> > > but then when I stepped through the code, I saw that its not even
> > > calling this class at all.
> I
> > > even
> > > took out the RollingFileAppender configuration from the xml config
> and
> > > just
> > > tried the smtp and it still skips over it.
> > >
> > > <?xml version="1.0" encoding="utf-8" ?>
> > >
> > > <log4net>
> > >
> > > <appender name="RollingFileAppender"
> > > type="log4net.Appender.RollingFileAppender">
> > >
> > > <file value="Logs/log.txt" />
> > >
> > > <appendToFile value="true" />
> > >
> > > <rollingStyle value="Size" />
> > >
> > > <maxSizeRollBackups value="10" />
> > >
> > > <maximumFileSize value="100KB" />
> > >
> > > <staticLogFileName value="true" />
> > >
> > > <layout type="log4net.Layout.PatternLayout">
> > >
> > > <conversionPattern value="%-5l :: %m%n" />
> > >
> > > </layout>
> > >
> > > </appender>
> > >
> > > <appender name="SmtpAppender"
> > > type="log4net.Appender.SmtpAppender">
> > >
> > > <to value="emailto@xxxxxxxxxx" />
> > >
> > > <from value="emailfrom@xxxxxxxxxx" />
> > >
> > > <subject value="Site Log" />
> > >
> > > <smtpHost value="mail.domain.com" />
> > >
> > > <bufferSize value="512" />
> > >
> > > <param name="Lossy" value="true" />
> > >
> > > <evaluator type="log4net.spi.LevelEvaluator">
> > >
> > > <param name="Threshold" value="WARN" />
> > >
> > > </evaluator>
> > >
> > > <layout type="log4net.Layout.PatternLayout">
> > >
> > > <param name="ConversionPattern" value="%n%d
> [%t] %-5p %c
> > > [%x] - %m%n%n%n" />
> > >
> > > </layout>
> > >
> > > </appender>
> > >
> > > <root>
> > >
> > > <!--
> > >
> > > * ALL
> > >
> > > * DEBUG
> > >
> > > * INFO
> > >
> > > * WARN
> > >
> > > * ERROR
> > >
> > > * FATAL
> > >
> > > * OFF
> > >
> > > -->
> > >
> > > <level value="ERROR" />
> > >
> > > <appender-ref ref="RollingFileAppender" />
> > >
> > > <appender-ref ref="SMTPAppender" />
> > >
> > > </root>
> > >
> > > </log4net>
> > >
> > > ===================================
> > > This list is hosted by DevelopMentor(r) http://www.develop.com
> > >
> > > View archives and manage your subscription(s) at
> > > http://discuss.develop.com
> > >
> > > ===================================
> > > This list is hosted by DevelopMentor(r) http://www.develop.com
> > >
> > > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> > >
> >
> > ===================================
> > This list is hosted by DevelopMentor(r) http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com
> >
> > ===================================
> > This list is hosted by DevelopMentorR http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> http://discuss.develop.com
> >
>
> ===================================
> This list is hosted by DevelopMentorR http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor(r) http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentorR http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor. http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor® http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise