Hi Ron,
I thank you very much for your prompt replies.
I have opened the file logmasters.log using DOS Window and it still shows up without NewLine character.
When i use the following piece of code
log.DebugFormat("{0}{1}{2}",
Environment.NewLine,
"Hello World",
Environment.NewLine);
Environment.NewLine,
"Hello World",
Environment.NewLine);
The NewLne characters are working.
But here my "Hello World" itself contain New Line Characters.
My problem here is "\r\n" within Hello World are not getting printed.
Is there any configuration setting to print the new line character?.
Is there any configuration setting to print the new line character?.
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.
