Make a change in the configuration file (log4j.properties) and set the
pattern for your (universal) appender to include only the log message.
--- config file---------------------------------------------
log4j.appender.Foo.layout=org.apache.log4j.PatternLayout
<snip>
# log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
</snip>
log4j.appender.Foo.layout.ConversionPattern=%m%n
-----------------------------------------------------------
--
Raghu Toppur
The Sharper Image
(415) 445-6179
-----Original Message-----
From: Rajan Annadurai [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 12:50 PM
To: [EMAIL PROTECTED]
Subject: log4j for file write
Hi All,
I have a simple requirement:
I would like to use log4j for the following purpose ....
1. Will create a logger and will let it know what file name to use
, rotation size
2. The logger should blindly write whatever I pass to it.
3. I do not want any additional messages written into the file (no
time stamp/id etc ...) . Only the message I pass to it.
Basically we all ready have a framework to have levels, filters and
message format. So we need log4j to only write to a text file and also
rotate it based on size.
How will I be able to do this. Please point me to any sample code if
available.
Thank you,
Rajan
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>