logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Log4Net NewLine Character Problem
Date Thu, 17 Nov 2005 05:32:12 GMT
What program are you using to view logmasters.txt? Have you tried
opening a DOS window and doing:

 type logmasters.txt

What happens when you send newlines directly to one ILog's methods?

 log.DebugFormat("{0}{1}{2}",
  Environment.NewLine,
  "Hello World",
  Environment.NewLine);

--- pradeep yanamandra <pradeep_yanamandra@yahoo.com> wrote:

> Hi Ron,
>     Thanks For the reply.
>     I tried that even still no use.
>     I even tried html <br> but still i could not get the new line
> character.
>    
>     Am i missing out something in the configuration file here?.
>    
>    Any furthur suggestions are welcome.
>    
>   
> 
> Ron Grabowski <rongrabowski@yahoo.com> wrote:
>   What happens when you do this?
> 
> message.Append(Environment.NewLine);
> message.Append("Hello Log4Net");
> message.Append(Environment.NewLine);
> message.Append("Bye Log4Net);
> 
> --- pradeep yanamandra 
> wrote:
> 
> > 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.
> > 
> > > type="log4net.Appender.RollingFileAppender">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > %logger [%property{NDC}] - %message%newline" />
> > 
> > 
> > 
> > Any furthur comments and suggestions are welcome.
> > 
> > Thanks in advance.
> > 
> > 
> > ---------------------------------
> > Yahoo! FareChase - Search multiple travel sites in one click. 
> 
>   
> 
> 
> 		
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in one click.  


Mime
View raw message