logging without a new-line
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rami_Abramson
Posted On:   Wednesday, December 25, 2002 10:45 PM

Hello, By default logging with log4j adds a new-line as in 'System.out.println(String)'. For example, logger.error( "Have a wonderful day."); logger.error( "Have a wonderful day."); results in : Have a wonderful day. Have a wonderful day. but how is it possible to log without the new-line as in 'System.out.print(String)'. Meaning, that the result shell be: Have a wonderful day.Have a wonderful day. thank you, Rami A.    More>>
			
Hello,

By default logging with log4j adds a new-line as in
'System.out.println(String)'.
For example,

logger.error( "Have a wonderful day.");
logger.error( "Have a wonderful day.");

results in :
Have a wonderful day.
Have a wonderful day.


but how is it possible to log without the new-line as in
'System.out.print(String)'.
Meaning, that the result shell be:

Have a wonderful day.Have a wonderful day.



thank you,

Rami A.
   <<Less

Re: logging without a new-line

Posted By:   Mark_Womack  
Posted On:   Friday, January 3, 2003 05:00 PM

What type of layout are you using? You can use PatternLayout, which does not assume a new line character. In fact, you have to specify in using the %n pattern if you want it.
About | Sitemap | Contact