I am trying to use LogKit and I am having a bit of
trouble appending messages.
I create a log file in a shell script and then I pass
the location of the logfile to a java program. I
would like LogKit to append debug messages to this
file.
Unfortunately, LogKit seems to delete the log file
before it writes to the logfile.
How do I append trace messages to a file that is
already created from LogKit?
The following is my code snippet:
Logger logger =
Hierarchy.getDefaultHierarchy().getLoggerFor("myCategory");
FileOutputLogTarget target = new
FileOutputLogTarget("C:\\SOD\\code\\test\\output\\out1.txt");
target.setFormat( "%7.7{priority} %5.5{time}
[%8.8{category}] " +
"(%{context}):
%{message}\\n%{throwable}" );
logger.setLogTargets( new LogTarget[] { target } );
logger.setPriority( Priority.DEBUG );
logger.debug( "This is a debug message" );
Mohit
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]