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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>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 <[EMAIL PROTECTED]>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 inser t 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.

Reply via email to