Formatter properties

Formatters specify the format of logged messages. You can associate a formatter with a handler to specify the format of messages logged through the handler. Table 3-18 describes the formatter properties.

StepsConfiguring a log formatter using the Log Formatter Configuration wizard

The Log Formatter Configuration wizard guides you through the process of configuring a log formatter.

  1. From within EAServer Manager, display the list of log profiles by expanding the Log Profiles folder.

  2. Expand a log profile, then expand the Formatter folder.

  3. Highlight the log formatter you want to configure.

  4. Select File | Configuration Wizard.

Table 3-18: Formatter settings

Tab name / Setting name

Specifies

General / Description

An optional description.

Type / Message Format

The format pattern for the message text, using the placeholders listed in Table 3-19. You can use the Insert Tag control to insert these placeholders, or type them yourself.

Type / Insert Tag

When editing the message format, use this control to insert the placeholder tags.

Type / Simple Date Format

The format for timestamps in log messages. The pattern for the timestamps embedded in log messages, as converted to strings by java.text.SimpleDateFormat. For details, see the DateFormat API documentation.

Table 3-19 lists the placeholders that you can use when specifying the message format pattern. Each placeholder represents part of the message.

Table 3-19: Message format placeholders

Placeholder

Represents

%LN

The logging category name

%MC

Message code (number)

%ML

Message level (severity)

%MT

Message text

%PT

Processed message text, which consists of the message number (if specified when the message was logged) and the message text

%SN

Sequence number

%SF

Source file name

%SL

Line number in the source file

%SM

Method name in the source file

%TI

Thread ID (enabled by setting server property com.sybase.jaguar.server.logspid)

%TH

Exception thrown (if available)

%TS

The timestamp, formatted as specified by the Simple Date Format setting

%NL

A line break