log.object.format
Grace Software
JavaLog

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





Name: log.object.format
Description: This controls how optional user objects appear in the formatted output.  Currently, there are two possible format styles - Lisp and Java.  The Lisp style only prints the values of the attributes while the Java style prints each attribute's type, name, and value.  This formatting is handled by the grace.io.PrintWriter class and its sub classes.  Basically, these classes use reflection to inspect the attributes of the given object and call the getAttribute() function (bean-like pattern).  Arrays, java.util.Vectors, and java.util.Hashtables are handled.

Notice, that this object format is used only if the user specified an object.  This allows text to be included in the output conditional on whether an object was specified.

Type: String
Acceptable Values: Can be any combination of the following:
%l Formats the object using the grace.io.LispPrintWriter with pretty = false.
%L Formats the object using the grace.io.LispPrintWriter with pretty = true.
%j Formats the object using the grace.io.JavaPrintWriter with pretty = false.
%J Formats the object using the grace.io.JavaPrintWriter with pretty = true.
%o Formats the object using the default formatting mechanism (Java).
plain-text Plain text is inserted into the formatted output.
 
Default Value: %j
Example Usage:
$ java -Dlog.thread.format="%j" grace.log.Log Prints in non-pretty java object format.  This command generates, for example:

grace.log.Log$Test ={Integer i=123; Double d=123.45; String s="a sample string"; Object nullString=null; Vector v={String [0]="Value1"; String [1]="Value2";}}