Logging configuration migration
editLogging configuration migration
editCompatibility with the legacy logging system is assured until the end of the v7 version.
All log messages handled by root context are forwarded to the legacy logging service. If you re-write
root appenders, make sure that it contains default appender to provide backward compatibility.
When you switch to the new logging configuration, you will start seeing duplicate log entries in both formats.
These will be removed when the default appender is no longer required. If you define an appender for a logger,
the log messages aren’t handled by the root logger anymore and are not forwarded to the legacy logging service.
| Parameter | Platform log record in pattern format | Legacy Platform log record text format |
|---|---|---|
@timestamp |
ISO8601_TZ |
Absolute |
logger |
|
|
level |
|
|
meta |
stringified JSON object |
N/A |
pid |
can be configured as |
N/A |
| Parameter | Platform log record in json format | Legacy Platform log record json format |
|---|---|---|
@timestamp |
ISO8601_TZ |
ISO8601 |
logger |
|
|
level |
|
|
meta |
merged in log record |
merged in log record |
pid |
|
|
type |
N/A |
|
error |
|
|
Logging configuration via CLI
editAs is the case for any of Kibana’s config settings, you can specify your logging configuration via the CLI. For convenience, the --verbose and --silent flags exist as shortcuts and will continue to be supported beyond v7.
If you wish to override these flags, you can always do so by passing your preferred logging configuration directly to the CLI. For example, with the following configuration:
logging:
appenders:
custom:
type: console
layout:
type: pattern
pattern: "[%date][%level] %message"
you can override the flags with:
| legacy logging | Kibana Platform logging | cli shortcuts |
|---|---|---|
--verbose |
--logging.root.level=debug --logging.root.appenders[0]=default --logging.root.appenders[1]=custom |
--verbose |
--quiet |
--logging.root.level=error --logging.root.appenders[0]=default --logging.root.appenders[1]=custom |
not supported |
--silent |
--logging.root.level=off |
--silent |
To preserve backwards compatibility, you are required to pass the root default appender until the legacy logging system is removed in v8.0.