18.5 Understanding the Log Format

Workflows use a specific format for file log entries. To improve log entry readability, the log entries in the catalina.out files use standard elements. Doing so facilitates the use of non-interactive, stream-oriented editors such as sgrep, sed, awk, and grep. The first part of each message begins with a locale-formatted timestamp followed by a data portion that contains information specific to the log entry. The data portion is the most flexible part of a log entry.

A log entry contains the following fields:

time-date-stamp [Severity] [Subsystem] [Message Text]

The following entry is an example entry that is logged when a user requests a role:

[INFO] 2021/07/26 21:15:57 com.novell.soa.af.impl.LogEvent:191 [WORKFLOW] [Workflow_Started] Initiated by 88293b680a5440c0b9856ee4c2ab72a7, Process ID: {9}, Process Name: Sample_PRD, Activity: {8}, Recipient: 88293b680a5440c0b9856ee4c2ab72a7, Secondary User: {10}
[INFO] 2021/07/26 21:15:57 com.novell.soa.af.impl.LogEvent:191 [WORKFLOW] [Workflow_Forwarded] Initiated by System, Process ID: {9}, Process Name: Sample_PRD, Activity: {8}, Recipient: 88293b680a5440c0b9856ee4c2ab72a7
[INFO] 2021/07/26 21:15:57 com.novell.soa.af.impl.LogEvent:191 [WORKFLOW] [Workflow_Forwarded] Initiated by System, Process ID: {9}, Process Name: Sample_PRD, Activity: {8}, Recipient: 88293b680a5440c0b9856ee4c2ab72a7
[INFO] 2021/07/26 21:15:57 com.novell.soa.af.impl.LogEvent:191 [WORKFLOW] [Workflow_Ended] Initiated by System, Process ID: {9}, Process Name: Sample_PRD, Activity: {8}, Recipient: 88293b680a5440c0b9856ee4c2ab72a7

Most log entries do not use the optional line breaks ([\n]). The time-date-stamp, the severity, subsystem, and message text are on the same line to enable stream-oriented editors that use only one line (such as grep) can be used to locate related log entries.

If a message is logged within the context of a transaction, the message text contains the correlation ID assigned to the transaction.

The Tomcat server uses the default character encoding of the host computer for the messages it writes.

18.5.1 Message Fields

A Tomcat server message contains a consistent set of fields, as described in the following table. In addition, if your applications use Tomcat logging services to generate messages, those messages will contain these fields.

Table 18-2 Log Entry Fields

Field

Description

Time-date-stamp

Time and date message originated, in a format specific to the locale. The Java Virtual Machine (JVM) that runs a Tomcat server instance refers to the host computer operating system for information about the local time zone and format.

The date and time is specified in the W3C profile format of ISO 8061. It has the following fields: year-month-day-T-hour-minutes-seconds-time zone. The ā€œZā€ value for the time zone indicates that the time is specified in UTC.

Severity

Indicates the degree of impact of the event reported by the message such as warning, informational, or debug.

In the example log entry, the level of severity is Info.

Subsystem

Indicates the Tomcat subsystem or the type of the module that was the source of the message. For example, JMS.

Message text

A description of the event or condition specific to the log entry. The description can be as simple as an informational string, such as the string in the example log entry:

Example:- [INFO] 2021/07/26 21:15:57 com.novell.soa.af.impl.activity.LogActivity:141 [WORKFLOW] [User_Message] Initiated by 88293b680a5440c0b9856ee4c2ab72a7, Process ID: Sample_PRD, Process Name: Sample_PRD, Activity: Log_0eayajf, Recipient: 88293b680a5440c0b9856ee4c2ab72a7, Author: Sample_PRD, Message: Dont Crash My IgSetup

If a message is logged within the context of a transaction, the message text contains an identifier assigned to the workflow transaction. Workflow transactions are actions such as authenticating a user, processing a request for a role, and request for access to a resource.

If a user requests access to multiple resources, the Tomcat server creates multiple request objects and gives each request a separate correlation ID. Tomcat processes each request separately and the status of each can be seen in the user request history.

The example log entry contains the following correlation ID:

UserApp#UserStartWorkflow#082080ec-5b10-498f-b87d-28825ab63278

18.5.2 Message Severity

The severity attribute of a log message indicates the potential impact of the event or condition that the message reports. The following table lists the severity levels of log messages, starting from the lowest to the highest level of impact.

Level

Description

Fatal

The least detail. Writes fatal errors to the log.

Error

Writes errors that can cause system processing not to proceed.

Warn

Logs potential failures, but the impact on execution is minimal. Warnings indicate that you should be aware that this event is happening and you might want to make a configuration change to avoid it.

Info

A low-level informational message used for reporting normal operations

Debug

Writes debugging information.

Trace

Used for most detailed messages. You can configure this level to report the request path of a method.

You can set log severity levels on loggers and appenders. When set on a logger, none of the appenders receives any events that are rejected by that logger. For example, if you set the log level to Info on a logger, none of the appenders will receive Warn level events. When you set a log level on the appender, the restriction applies only to that appender and not to other appenders. For example, if you turn off error for the file appender, no Error messages are written to the log file. However, Error messages are written to the standard.out file.

<logger name="com.sssw" level="INFO" additivity="true">
             <appender-ref ref="WFCEF"/>
        </logger>
<logger name="com.netiq" level="DEBUG" additivity="true">
            <appender-ref ref="WFCEF"/>
        </logger>

You can set log levels for loggers using the Logging page or the logging configuration file. You can also configure loggers through APIs. You can only enable or disable an appender.

The workflow modules generate many messages of lower severity and fewer messages of higher severity. For example, under normal circumstances, they generate many Info or Trace messages. Applications that use Tomcat logging services can use the severity level of Debug.