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 Re: Log4Net NewLine Character Problem
Date Thu, 17 Nov 2005 16:48:59 GMT
  Hi,
   It is not the problem of Log4net.
   I found out the answer. The problem is i am  passing the string message across a
   web service to the Log4Net file.
   
    "\r\n" is getting replaced with "\n" at the web service side.
   
     So i again replaced "\n" with "\r\n" at the web service side.
   
  I don't know whether it is good way of replacing it. But for now it is working!!


Ron Grabowski <rongrabowski@yahoo.com> wrote:
  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 
wrote:

> Hi Ron,
> Thanks For the reply.
> I tried that even still no use.
> I even tried html 
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 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. 




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