logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skifreak <skifreak...@gmail.com>
Subject Newbie - can't get anything to show in the log
Date Mon, 17 Dec 2012 13:48:41 GMT
This is a console C# 4.0 application

    <appender name="RollingLogFileAppender"
      <file type="log4net.Util.PatternString" value="F:\logs\CPDMonitor"/>
      <appendToFile value="true"/>
      <rollingStyle value="Date"/>
      <datePattern value="_yyyyMMdd_hh_mm_ss_sss'.log'"/>
      <maximumFileSize value="20MB"/>
      <staticLogFileName value="false"/>
      <maxSizeRollBackups value="20"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger -
    <logger name="RollingLogFileAppender">
      <level value="DEBUG" />
      <appender-ref ref="RollingLogFileAppender" />

In main I did:
log = LogManager.GetLogger(typeof(Program));

To add an entry I used:
log.DebugFormat("Sending eMail " + DateTime.Now.ToString("yyyyMMdd
hh:mm:ss") + " with " + alList.Count.ToString() + " records.");

It will create the log but I get no error on the above log.DebugFormat line

Thanks for any help in advance,

View this message in context: http://apache-logging.6191.n7.nabble.com/Newbie-can-t-get-anything-to-show-in-the-log-tp35190.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.

View raw message