logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Pepersack" <RPepers...@mdinsurance.state.md.us>
Subject Log Multi-Line Messages
Date Wed, 30 Apr 2008 14:15:16 GMT
I'm logging the a message from a server that may span several lines.  For example:

220 Connected to server.
220 Connection will close if idle for more than 5 minutes.

When log4j prints this to my log file, the output looks like this:

2008-04-30 08:59:01 [MyThread] DEBUG MyClass.myMethod(): 220 Connected to server.
220 Connection will close if idle for more than 5 minutes.

Note that the second line isn't prefixed with the text created by my subclass of PatternLayout.

How can I get all the output to be prefixed with the layout that I specify?  For example:

2008-04-30 08:59:01 [MyThread] DEBUG MyClass.myMethod(): 220 Connected to server.
2008-04-30 08:59:01 [MyThread] DEBUG MyClass.myMethod(): 220 Connection will close if idle
for more than 5 minutes.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message