-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core.logging] Uses host timezone as default #90368
Changes from 2 commits
acbe1fd
fc509ac
a59ca2e
91f3ffc
666863a
d4dd4d4
3452ac0
06b656d
973095b
48ca1c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ describe('logging service', () => { | |
const loggedString = getPlatformLogsFromMock(mockConsoleLog); | ||
expect(loggedString).toMatchInlineSnapshot(` | ||
Array [ | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][INFO ][test-file] handled by NP", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][INFO ][test-file] handled by NP", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Default format changed from |
||
] | ||
`); | ||
}); | ||
|
@@ -131,9 +131,9 @@ describe('logging service', () => { | |
|
||
expect(getPlatformLogsFromMock(mockConsoleLog)).toMatchInlineSnapshot(` | ||
Array [ | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][INFO ][test-file] info", | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][WARN ][test-file] warn", | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][ERROR][test-file] error", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][INFO ][test-file] info", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][WARN ][test-file] warn", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][ERROR][test-file] error", | ||
] | ||
`); | ||
|
||
|
@@ -162,9 +162,9 @@ describe('logging service', () => { | |
|
||
expect(getPlatformLogsFromMock(mockConsoleLog)).toMatchInlineSnapshot(` | ||
Array [ | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][INFO ][test-file] info", | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][WARN ][test-file] warn", | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][ERROR][test-file] error", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][INFO ][test-file] info", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][WARN ][test-file] warn", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][ERROR][test-file] error", | ||
] | ||
`); | ||
|
||
|
@@ -199,9 +199,9 @@ describe('logging service', () => { | |
|
||
expect(getPlatformLogsFromMock(mockConsoleLog)).toMatchInlineSnapshot(` | ||
Array [ | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][INFO ][test-file] info", | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][WARN ][test-file] warn", | ||
"[xxxx-xx-xxTxx:xx:xx.xxxZ][ERROR][test-file] error", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][INFO ][test-file] info", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][WARN ][test-file] warn", | ||
"[xxxx-xx-xxTxx:xx:xx.xxx-xx:xx][ERROR][test-file] error", | ||
] | ||
`); | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The legacy logging timezone default was changed from UTC to the host timezone in #22696. It appears that the documentation wasn't updated to reflect the change. As it stands right now,
logging.timezone
is actually optional (internally falling back to the local timezone of the host) and we needed to update the docs to reflect that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we certain that this is the current behavior?
I see that the changes made in #22696 are no longer present in the legacy logging config schema: https://github.com/elastic/kibana/blob/master/packages/kbn-legacy-logging/src/schema.ts#L61
It seems to me that the current setup docs on master are accurate based on how the system works, but that's a little confusing because this update to the migration doc which was added in #22696 is no longer correct: https://github.com/elastic/kibana/blob/master/docs/migration/migrate_8_0.asciidoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukeelmers The global
logging.timezone
is only applied to the legacy logging system. In the KP, this setting is ignored. This PR doesn't make any changes to the legacy logging behavior, it changes the default timezone used in the KP logging system to match the behavior of the legacy logger.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: I removed
Optional
and replaced*Default: 'UTC'
* with "When not set, log events use the host timezone"