Logging Style
A logging style configuration parameter can be used to configure rollover, JSON formatting and timestamp behaviour. The different logging styles can be specified in the local-configuration.yaml file, using the loggingStyle property.
Set the property using the following format (the space after the colon is mandatory):
loggingStyle: value
The property can take one of the following values:
Logging style values:
• | CONTINUOUS—Rollover is externally handled, if at all. Timestamp values use the local time zone. This is the default if no logging style is specified. |
• | CONTINUOUS_UTC—Same as CONTINUOUS, but with UTC timestamp. |
• | DAILY_ROLLOVER—The log file is closed at midnight local time, compressed with gzip, and a new log file is started. Timestamp values use the local time zone. |
• | DAILY_ROLLOVER_UTC—Same as DAILY_ROLLOVER, but with UTC timestamp. |
• | JSON_ROLLOVER—Logs are formatted using JSON. The log file is closed at midnight local time, compressed with gzip (suitable for filebeat), and a new log file is started. Always uses ISO 8601 UTC timestamps. |
• | JSON—Logs are emitted as JSON to stdout only (suitable for Docker). Always uses ISO 8601 UTC timestamps. |
Note:The Docker-friendly JSON logging style is not supported when the local license server is run as a Windows or Linux service (because it only writes to stdout). If set, the style will be changed to DAILY_ROLLOVER.
Overriding the Timestamp Format
If you have specific timestamp requirements (not local, not UTC), the timestamp format can be adapted. To change the timestamp, you must supply an override timestamp format as a Java system property. Example:
-Dlogging.timestamp="%d{MMM-dd-yyyy HH:mm:ss,SSS}"
This option is not available for JSON logging, because ISO 8601 UTC is standard.