logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pradeep yanamandra <pradeep_yanaman...@yahoo.com>
Subject Log4Net NewLine Character Problem
Date Wed, 16 Nov 2005 23:01:34 GMT
Hi,
  
    I am using the latest version of Log4Net(1.2.9 beta version).
    I am unable to insert new line characters in the content message of log4net.
    
    I am using the following skelton piece of code 
      -----------------------------------------------------------
       StringBuilder message;
  
       message.Append("\r\n");
       message.Append("Hello Log4Net");
       message.Append("\r\n");
       message.Append("Bye Log4Net);
         log.Debug(message);
   ---------------------------------------------------------------
   
   Instead of printing new line characters for \r\n it is printing as follows.
        
Hello Log4Net Bye Log4Net.
   
      My skelton of Log4Net RollingLogFileAppender is as follows.
   
       <appender name="RollingLogFileAppender"  type="log4net.Appender.RollingFileAppender">
      <file value="..\Logs\logmasters.txt" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="10" />
      <maximumFileSize value="1KB" />
      <staticLogFileName value="true" />
       <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}]
- %message%newline" />
      </layout>
    </appender>
   
  Any furthur comments and suggestions are welcome.
   
  Thanks in advance.

		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  
Mime
View raw message