mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
This commit is contained in:
parent
c0592215ab
commit
9dc1bdee33
3 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue