-
Notifications
You must be signed in to change notification settings - Fork 1
feat: allow configurable json logging for besu #12
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ metadata: | |
| {{- $persistenceEnabled := default false (get $persistence "enabled") }} | ||
| {{- $mountPath := default "" (get $persistence "mountPath") }} | ||
| {{- $privateKeyFilename := default "privateKey" .Values.config.privateKeyFilename }} | ||
| {{- $logFormat := default "plain" .Values.config.logFormat }} | ||
| data: | ||
| config.toml: |- | ||
| data-path="/data" | ||
|
|
@@ -61,3 +62,21 @@ data: | |
| metrics-host={{ .Values.config.metrics.host | quote }} | ||
| metrics-port={{ .Values.service.ports.metrics | int }} | ||
| metrics-category={{ .Values.config.metrics.categories | toJson }} | ||
| {{- if eq $logFormat "json" }} | ||
| log-config.xml: |- | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Configuration status="INFO" monitorInterval="5"> | ||
| <Appenders> | ||
| <Console name="Console" target="SYSTEM_OUT"> | ||
| <JsonLayout compact="false" eventEol="true" properties="true" stacktrace="true"> | ||
|
Contributor
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. The <JsonLayout compact="true" eventEol="true" properties="true" stacktrace="true"> |
||
| <KeyValuePair key="container" value="${hostName}" /> | ||
| </JsonLayout> | ||
| </Console> | ||
| </Appenders> | ||
| <Loggers> | ||
| <Root level="{{ .Values.config.logging }}"> | ||
| <AppenderRef ref="Console" /> | ||
| </Root> | ||
| </Loggers> | ||
| </Configuration> | ||
| {{- end }} | ||
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 Log4j2 configuration has
status="INFO". This will cause Log4j2 to print its internal status logging at the INFO level to standard output, which can be verbose. It's generally recommended to set this toWARNin production environments to only see important internal Log4j2 messages.<Configuration status="WARN" monitorInterval="5">