logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Jansen" <Georg.Jan...@FaktNet.com>
Subject RE: please verify my config file.
Date Tue, 21 Feb 2006 22:03:56 GMT


I was a bit fast in my previous response I didn't notice your <param
name="Threshold" value="IINFO">


But I guess you only wanted to see the INFO message, and not the WARN,ERROR
and FATAL? 


If that's the case, my second example with the filter should do the job.




http://www.l4ndash.com <http://www.l4ndash.com/>  - Log4Net Dashboard /
Log4Net Viewer





From: Georg Jansen [mailto:Georg.Jansen@FaktNet.com] 
Sent: 21. februar 2006 22:57
To: 'Log4NET User'
Subject: RE: please verify my config file.




If you want to send INFO and higher (i.e. INFO, WARN, ERROR and FATAL) add a
threshold parameter to your smtp appender configuration


<threshold value="INFO" />


If you only want to send INFO messages you need to define a filter, and add
it to the smtp appender configuration


<filter type="log4net.Filter.LevelRangeFilter">
    <levelMin value="INFO" />
    <levelMax value="INFO" />





http://www.l4ndash.com <http://www.l4ndash.com/>  - Log4Net Dashboard /
Log4Net Viewer







From: Patten, Stephen [mailto:Stephen.Patten@impaccompanies.com] 
Sent: 21. februar 2006 22:32
To: Log4NET User
Subject: please verify my config file.


Hello group,


I'm having a problem where I'd like to limit the smpt appender to only send
INFO messages and thought I configured my file correctly. What am I doing



Thank you,










                   <appender name="RollingFileAppender"

                             <file value="C:\\Logs\\ICLS.log" />

                             <appendToFile value="true" />

                             <rollingStyle value="Size" />

                             <maxSizeRollBackups value="10" />

                             <maximumFileSize value="500MB" />

                             <staticLogFileName value="true" />

                             <layout type="log4net.Layout.PatternLayout">

                                      <conversionPattern value="%date
[%thread] %-5level %logger [%ndc] - %message%newline" />



                   <appender name="HttpTraceAppender"
type="log4net.Appender.AspNetTraceAppender" >

                             <layout type="log4net.Layout.PatternLayout">

                                      <conversionPattern value="%date
[%thread] %-5level %logger [%ndc] - %message%newline" />



                   <appender name="UdpAppender"

                             <localPort value="80" />

                             <remoteAddress value="machinename" />

                             <remotePort value="8080" />


                                      <locationInfo value="true" />



                   <appender name="SmtpAppender"

value="SharedServicesAutomationGroup@Domain.com" />

                             <from value="ICLS@domain.com" />

                             <subject value="logging message" />

                             <smtpHost value="domain.com" />

                             <param name="BufferSize" value="0" />

                             <param name="Lossy" value="false" />

                             <param name="Threshold" value="INFO" />


value="%property{log4net:HostName} :: %level :: %message %newlineLogger:
%logger%newlineThread: %thread%newlineDate: %date%newlineNDC:
%property{NDC}%newline%newline" />




                             <level value="ALL" />

                             <appender-ref ref="RollingFileAppender" />

                             <appender-ref ref="HttpTraceAppender" />

                             <appender-ref ref="UdpAppender" />

                             <appender-ref ref="SmtpAppender" />







Stephen Patten

Shared Services Technical Manager

Impac Mortgage Holdings, Inc.

949-274-1141 (Cell)

949-260-4533 (Office)

949-706-6329 (Fax)


View raw message