Logging configuration migrationedit

Compatibility 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 2012-01-31T23:33:22.011-05:00

Absolute 23:33:22.011

logger

parent.child

['parent', 'child']

level

DEBUG

['debug']

meta

stringified JSON object {"to": "v8"}

N/A

pid

can be configured as %pid

N/A

Parameter Platform log record in json format Legacy Platform log record json format

@timestamp

ISO8601_TZ 2012-01-31T23:33:22.011-05:00

ISO8601 2012-01-31T23:33:22.011Z

logger

log.logger: parent.child

tags: ['parent', 'child']

level

log.level: DEBUG

tags: ['debug']

meta

merged in log record {... "to": "v8"}

merged in log record {... "to": "v8"}

pid

process.pid: 12345

pid: 12345

type

N/A

type: log

error

{ message, name, stack }

{ message, name, stack, code, signal }

Logging configuration via CLIedit

As 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.