You can configure which fields that should be displayed in a logger agent. In the OCSP configuration file, specify as follows:
agent.log.<#>.format.fields={<field>} {<field>} ... {<field>}
See this table for description of constants and values:
Constants and Values | Description |
---|
<v#> | Replace <v#> with the log sequence number. |
<field>
| Replace <field> with any of the following supported fields: date - log date (default yyyy-MM-dd:HH:mm:ss.SSS)
class - log class (for example, audit, trace)
severity - log severity
thread - log thread name
transactionId - log transaction ID of a client request
message - log message
|
You can also manipulate how a field will behave when used by the logger agent, for example, offset and length. To do this:
- Specify integers on defined positions separated by a comma after a colon inside the curly brackets, such as {
field:width,offset,length:novalue
}, where:
field
- [string] the field name, for example, date
width
- [integer] minimum width, default 1 or specified length
offset
- [integer] offset from start or offset from end if negative, default 0
length
- [integer] maximum length, default unlimited (0)
novalue
- [string] replacement string if no value exists for the provided field (default is ' - ') - To insert a line break after a field, use the keyword
%s
.
Example:
agent.log.1.format.fields={date} {class} {transactionId:5,,28:{thread}} {message} %s