log.exception.format
Grace Software
JavaLog

$Revision: 1.2 $
$Date: 1999/10/28 11:17:25 $





Name: log.exception.format
Description: This controls how exceptions are logged.  This property is especially useful since it can not be specified as a sub format in a log.format.  Exceptions are specified optionally by the programmer who calls the log function.  Therefore, the exception format is used only when exception is given.  Also, if the programmer calls one of the log functions and passes an exception to be logged, the exception is formatted at the point the object format character '%o' is in the log.format string.  So, exceptions are treated as normal objects, except the special format string described here is used instead of the default object formatting.
Type: String
Acceptable Values: Can be any combination of the following:
%c Formats the class name of the exception.
%m Formats the exception message.
%s Formats the entire stack trace.
plain-text Plain text is inserted into the formatted output.
 
Default Value: : %c: %m: %s
Example Usage:
$ java -Dlog.format="%t %e %o\n" -Dlog.exception.format="%m" grace.log.Log Prints the time, event type, and object/exception with the exception format being the exception message only.  An example line would like this:

03/05/99 18:11:08 error Exception message