JVM log interpretation
View the JVM log files to determine problems within application environments.
The JVM logs contain print data written by applications. The application can write this data directly in the form of System.out.print(), System.err.print(), or other method calls. The application can also write data indirectly by calling a JVM function, such as an Exception.printStackTrace(). In addition, the System.out JVM log contains system messages written by the WebSphere Application Server.
(ZOS) If we allow the application server to format the application data, it is printed in the normal z/OS trace format. If we do not allow the application server to format the application data, the raw text is printed, which is much harder to analyze.
We can configure the thread ID used in the log and trace files of WAS v9.0 as either the hexadecimal representation of the thread ID from java.util.logging.LogRecord, or the hexadecimal representation of the thread ID from java.lang.Thread. Set the Java system property...
com.ibm.websphere.logging.useJULThreadID = true
...to have the thread ID match...
java.util.logging.LogRecord
Set the system property to false to have the thread ID match...
java.lang.Thread
If the system property is not specified, the thread ID matches the java.lang.Thread thread ID.
We can format application data to look like WAS system messages using the Installed Application Output field of the JVM Logs properties panel, or as plain text with no additional formatting. WAS system messages are always formatted. Depending on how the JVM log is configured, formatted messages can be written to the JVM logs in either basic or advanced format.
Message formats
Formatted messages are written to the JVM logs in one of two formats:
- Basic Format
- The format used in earlier versions of WAS.
- Advanced Format
- Extends the basic format by adding information about an event, when possible.
Basic and advanced format fields
Basic and Advanced Formats use many of the same fields and formatting techniques. The various fields that may be found in these formats follow:
- TimeStamp
- The timestamp is formatted using the locale of the process where it is formatted. It includes a fully qualified date (for example YYMMDD), 24 hour time with millisecond precision and a time zone.
- ThreadId
- An 8 character hexadecimal value generated from the hash code of the thread that issued the message.
- ThreadName
- The name of the Java thread that issued the message or trace event.
- ShortName
- The abbreviated name of the logging component that issued the message or trace event. This is typically the class name for WAS internal components, but can be some other identifier for user applications.
- LongName
- The full name of the logging component that issued the message or trace event. This is typically the fully qualified class name for WAS internal components, but can be some other identifier for user applications.
- EventType
- A one character field that indicates the type of the message or trace event. Message types are capitalized. Possible values include:
F A Fatal message. E An Error message. W A Warning message. A An Audit message. I An Informational message. C An Configuration message. D A Detail message. O A message that was written directly to System.out by the user application or internal components. R A message that was written directly to System.err by the user application or internal components. Z A placeholder to indicate the type was not recognized.
- ClassName
- The class that issued the message or trace event.
- MethodName
- The method that issued the message or trace event.
- Organization
- The organization that owns the application that issued the message or trace event.
- Product
- The product that issued the message or trace event.
- Component
- The component within the product that issued the message or trace event.
Basic format
Message events displayed in basic format use the following format. The notation <name> indicates mandatory fields that will always appear in the basic format message. The notation [name] indicates optional or conditional fields that will be included if they can be determined.
<timestamp><threadId><shortName><eventType>[className][methodName]<message>
Advanced format
Message events displayed in advanced format use the following format. The notation <name> is used to indicate mandatory fields that will always appear in the advanced format for message entries. The notation [name] is used to indicate optional or conditional fields that will be included if they can be determined.
<timestamp><threadId><eventType><UOW><source=longName>[className] [methodName]<Organization><Product><Component> [thread=threadName]<message>
(ZOS) Format of an error log entry
1| 2005/03/02 17:31:17.641 01 t=8FB718 c=UNK key=S2 (13007002) 2| ThreadId: 0000004e 3| FunctionName: com.ibm.ws.sm.workspace.impl.WorkSpaceManagerImpl 4| SourceId: com.ibm.ws.sm.workspace.impl.WorkSpaceManagerImpl 5| Category: AUDIT 6| ExtendedMessage: BBOO0222I: WKSP0023I: Workspace configuration consistency check is disabled.
Line number Component Description 1 2005/03/02 17:31:17.641 01 Date / timestamp / 2-digit record version number 1 t=8FB718 MVS™ TCB (thread) Address 1 c=UNK Request correlation information 1 key=S2 State/Key (S=Supervisor,P=Problem) 1 (13007002) Trace Point Identifier 2 ThreadId: 0000004e Thread Identifier (TID) 3 FunctionName: com.ibm.ws.sm.workspace.impl.WorkSpaceManagerImpl Function name 4 SourceId: com.ibm.ws.sm.workspace.impl.WorkSpaceManagerImpl Source Identifier 5 Category: AUDIT Category 6, 7 ExtendedMessage: ... Log message
Configure the JVM logs View JVM logs