The WebSphere Application Server enterprise services' activity logs
and trace logs must be formatted before you can read their contents. You can
use the showlog utility to format an activity log or trace log, and pipe the
formatted output to a file that you can view using the Log
Analyzer or any text editor:
Note: Run the showlog utility
on the host where the log was created (where events in the log occurred) to
get the optimum substitution values in the output file.
If you want
to format several trace logs at the same time and merge the output into one
file, you can use the combtrace utility, as described in Formatting and merging multiple trace files.
To use the showlog utility to format an activity or trace log file, complete the following steps
-
Open a command-line window on the host where the log file is stored.
-
On the command line, type the following command
showlog -cpp [-debug|-d|-d1|-d2|-d3] [-?] filename [> outfilename ]
The command line options may be specified in any order.
Where:
- -cpp
- Indicates that you want to format an enterprise services' log.
- -debug, -d, -d1
- These alternative options are all equivalent and display log messages in level 1 debug mode. Under this mode, showlog formats each activity log entry with full debug information, but ORB communication traces are not formatted.
- -d2
- This option is used when formatting ORB communication trace logs. It displays log messages in debug level 2 mode which is equivalent to debug level 1 mode plus the formatting of ORB communication trace messages in brief mode for enhanced readability. You get additional GIOP header data following the raw data dump.
- -d3
- This option is used when formatting ORB Communication trace logs. It displays log messages in debug level 3 mode which is equivalent to debug level 2 mode plus the verbose expansion of communication traces. This includes formatting of service context and tagged profile information. You get additional GIOP header data and other information on the service context, object key, principal, and so on.
- -?
- displays the help information for the showlog command.
- filename
- is the input log file, for example,
activitycpp.log. The showlogcpp utility reads the file and formats it for reading. The filename does not have to be the first option specified.
- > outfilename
- This option is used to pipe the formatted output to a new file.
Note: If the log output is piped to a file and an editor is used to display the information, turn on word wrap in the editor to view the full contents of a line.
Note: If you do not specify -debug, -d, or -d1, then only PrimaryMessage, ExtendedMessage, and RawDataLen information is included for each entry in the log.
The
showlogcpp utility formats the information in the input log file,
and optionally pipes the output to a new file that can be displayed in a text
editor (or some other utility).
For example, the following steps format the activity log file
c:\WebSphere\AppServer\services\activitycpp.log and pipe the formatted output to the file
showlogcpp.out:
- Open a command line window on the host where the activity log is stored
- At the command line, type the following command:
showlogcpp c:\WebSphere\AppServer\services\activitycpp.log > showlogcpp.out
After formatting a trace file, you can use the protrace utility to
filter the output in the outfilename file, as described
in Filtering the information in a formatted trace file.