logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Richardson <RDRichard...@rad-con.com>
Subject How can I get a simple log to write to disk as soon as the message is logged?
Date Mon, 17 Dec 2012 21:36:48 GMT
Greetings!

I have a very simple log file to generate rolling log files.  I want to ensure that log messages
are readable as soon as they are generated.  My log file stayed at 0 bytes as long as my program
is running, and then after the program exited the log messages appeared.  Is there a setting
I can use to change that behavior?

Here's the configuration file:

<?xml version="1.0" encoding="utf-8"?>
<log4net>
  <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
    <file value="CraneInterface.log" />
    <appendToFile value="true" />
    <maxSizeRollBackups value="90" />
    <rollingStyle value="Size" />

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date - %message%newline" />
    </layout>
  </appender>

  <root>
       <level value="DEBUG" />
      <appender-ref ref="RollingFile" />
  </root>

</log4net>


Thank you very much.

Mime
View raw message