-
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
Use log4j pattern syntax #57433
Use log4j pattern syntax #57433
Conversation
file name is required. let users to setup everything
@@ -66,21 +67,27 @@ function validateTimezone(timezone: string) { | |||
} | |||
|
|||
function validate(rawString: string) { | |||
for (const matched of rawString.matchAll(timestampRegExp)) { |
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.
TIL matchAll
is not polyfilled in runtime. that was a surprise, since it works in tests
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.
What was the issue outside of the scope of tests?
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.
I contacted @elastic/kibana-operations to clarify this. The test and runtime envs should be identical
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.
should be fixed in #57467
@@ -140,13 +140,6 @@ export class LoggingConfig { | |||
layout: { kind: 'pattern', highlight: true }, | |||
} as AppenderConfigType, | |||
], | |||
[ | |||
'file', |
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.
Removed since it requires defining a file name. I don't think we should set a default for it.
Pinging @elastic/kibana-platform (Team:Platform) |
@@ -66,21 +67,27 @@ function validateTimezone(timezone: string) { | |||
} | |||
|
|||
function validate(rawString: string) { | |||
for (const matched of rawString.matchAll(timestampRegExp)) { |
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.
What was the issue outside of the scope of tests?
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* address comments * use log4j-like syntax in layout pattern * %timestamp --> %date to match log4j conversion pattern * %context --> %logger to match log4j pattern * remove file from pre-defined appenders. file name is required. let users to setup everything * matchAll is not polyfilled in runtime * document available patterns and migration path * document BWC requirements * Revert "matchAll is not polyfilled in runtime" This reverts commit 9f491d4. * address comments Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: (22 commits) Use log4j pattern syntax (elastic#57433) [ML] Categorization field example endpoint tests (elastic#57471) [Lens] Filter out pinned filters from saved object of Lens (elastic#57197) Lens client side shim cleanup (elastic#56976) [Maps] do not show border color for icon in legend when border width is zero (elastic#57501) refactors 'data-providers' tests (elastic#57474) add `absolute` option to `getUrlForApp` (elastic#57193) [Telemetry] Migrate public to NP (elastic#56285) address flaky test where instances might have different start… (elastic#57506) fix(NA): support legacy plugins path in plugins (elastic#57472) build immutable bundles for new platform plugins (elastic#53976) [SIEM] [Detection Engine] Reject if duplicate rule_id in request payload (elastic#57057) Add autocomplete="off" for input type="password" to appease the scanners (elastic#56922) Use default spaces suffix for signals index if spaces disabled (elastic#57244) [Alerting] Create alert design cleanup (elastic#56929) Management Api - add to migration guide (elastic#56892) fixing maps (elastic#56706) [Maps] Autocomplete for custom color palettes and custom icon palettes (elastic#56446) [Alerting] make actionGroup name's i18n-able (elastic#57404) fixed flaky test (elastic#57490) ... # Conflicts: # src/legacy/core_plugins/telemetry/public/components/__snapshots__/telemetry_form.test.js.snap # src/plugins/telemetry/public/components/telemetry_management_section.tsx
* address comments * use log4j-like syntax in layout pattern * %timestamp --> %date to match log4j conversion pattern * %context --> %logger to match log4j pattern * remove file from pre-defined appenders. file name is required. let users to setup everything * matchAll is not polyfilled in runtime * document available patterns and migration path * document BWC requirements * Revert "matchAll is not polyfilled in runtime" This reverts commit 9f491d4. * address comments Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: (22 commits) skip flaky suite (elastic#50018) skip settings tests (elastic#57608) skip failing suite (elastic#44631) [SIEM] [Case] Initial UI (elastic#57283) handle viewing sample dashboards on default dist (elastic#57510) Fix detection of "system requests" in plugins (elastic#57149) [ML] New Platform server shim: update job service schema (elastic#57614) skip flaky suite (elastic#44631) [APM] Update monospace font family variable (elastic#57555) skip flaky test (elastic#57377) Skip save query tests (elastic#57589) [Maps] allow simultaneous opening of multiple tooltips (elastic#57226) [Uptime] Fix/host connected components (elastic#56969) [logs][metrics][docs] Update screenshots for 7.6 (elastic#57254) [ML] New Platform server shim: update job service routes to use new platform router (elastic#57403) [Maps] Fix document source top hits split by scripted field (elastic#57481) Use log4j pattern syntax (elastic#57433) [ML] Categorization field example endpoint tests (elastic#57471) [Lens] Filter out pinned filters from saved object of Lens (elastic#57197) Lens client side shim cleanup (elastic#56976) ...
Summary
{level}
-->%level
. Note: we support only long patterns atm (%date
, not%d
, since the latter is a bit cryptic)timestamp
-->date
,context
-->logger
to follow log4j terms. But still keepmeta
, sincemap
is referenced to MapMessage in log4jfile
from pre-defined appenders. I don't want to introduce a default for the log file name, since it creates another maintainability problem.Checklist
Delete any items that are not applicable to this PR.
For maintainers
Dev docs
Logging output of the New platform plugins can use adjusted via new config.