Using Command Line Options: Managing Log Files


If you already know what log file information you want from your test runs, you can set your tests to suppress any other information, or you can add a command line call to do post-processing on a log file and extract the data you need.

For log file filtering at run test time, use the options:

Log filtering options at run test time

Log filter option Description
-log filename Uses the filename you specify for the log file
-llcount size Limits the log to the size you specify, in characters.
-llfilter flags Suppresses the log file content represented by the flags. See Table 13-8 for a list of log file filters.

For log file filtering after the file has already been generated, use:

Log filtering options for existing logs

Log filter option Description
-logfilter filters logfile [outfile] Applies filters to the log file and prints this out either to outfile (optional) or System.out (default). See Table 13-8 for a list of log file filters.
-loghtml filters logfile [outfile] Similar to -logfilter, this applies filters to the logfile and writes the filtered log out in HTML format. The filter may include the characters E, T, 1, 2, or just - to indicate no extras. Additional log types are limited to Event, Time, Stdout(1) and Stderr(2).
-logsum (logfile)+ [-out outfile] Summarizes the log file (or files) and prints it to outfile or to System.out. This must be the last flag in the command line.
-archive archivefile [logfile]+ Adds the log files into the archive. Log files already in the archive are overwritten. This must be the last flag in the command line.

The -llfilter and -logfilter commands use log filtering flags--these are the flags that appear as the first character in every line of the long file.

Log filtering flags

Log filter flag Description
A Arguments (arguments passed to each test)
C Control (flow of control within the test)
D Other
E Event (each event executed)
H Header (system information)
M Machine
R Result
S Summary (comparison and checking results)
T Time (timestamps)
X Error
1 System.out
2 System.err

For a single reference on all command line flags, see JavaStar Command Reference in the JavaStar API Reference.




Send feedback to JavaStar-feedback@suntest.com
Copyright © 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303. All rights reserved.