[core.logging] Remove meta from default pattern layout. (#92104) (#92317)

Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
This commit is contained in:
Kibana Machine 2021-02-22 21:03:29 -05:00 committed by GitHub
parent c0592215ab
commit 9dc1bdee33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -82,8 +82,8 @@ There are two types of layout supported at the moment: `pattern` and `json`.
### Pattern layout
With `pattern` layout it's possible to define a string pattern with special placeholders `%conversion_pattern` (see the table below) that
will be replaced with data from the actual log message. By default the following pattern is used:
`[%date][%level][%logger]%meta %message`. Also `highlight` option can be enabled for `pattern` layout so that
will be replaced with data from the actual log message. By default the following pattern is used:
`[%date][%level][%logger] %message`. Also `highlight` option can be enabled for `pattern` layout so that
some parts of the log message are highlighted with different colors that may be quite handy if log messages are forwarded
to the terminal with color support.
`pattern` layout uses a sub-set of [log4j2 pattern syntax](https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout)

View file

@ -108,7 +108,7 @@ test('`format()` correctly formats record with custom pattern.', () => {
});
test('`format()` correctly formats record with meta data.', () => {
const layout = new PatternLayout();
const layout = new PatternLayout('[%date][%level][%logger]%meta %message');
expect(
layout.format({

View file

@ -22,7 +22,7 @@ import {
/**
* Default pattern used by PatternLayout if it's not overridden in the configuration.
*/
const DEFAULT_PATTERN = `[%date][%level][%logger]%meta %message`;
const DEFAULT_PATTERN = `[%date][%level][%logger] %message`;
export const patternSchema = schema.string({
validate: (string) => {