In log4j default logging configuration, each line of log message which is printed in server log has maximum length comes around 8221 characters. If it exceeds this length, it is printed in multiple lines. But I want to print it in a single line, though whatever the length of each log message has.
views:
123answers:
2
+3
Q:
What is the length of Java log4j's log message's max length? How to print it in a single line?
+1
A:
I am really sorry but I cannot resist when I see questions like this.
kazanaki
2010-05-27 10:59:53
A:
To get log print in a single line, What I did is, I configured PatternLayout like value="%m%n", without configuring date format and etc..
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n"/>
</layout>
This is what my need & get solved.
Sakthivel
2010-05-31 12:11:47