Avoidable(?) error message after changing log format to JSON? #12422
|
I have changed the log format of my kafka.kafka.strimzi.io with this configuration: spec:
kafka:
logging:
type: inline
loggers:
appender.console.layout.type: JsonTemplateLayout
appender.console.layout.eventTemplate: […] # omited, see https://github.com/apache/logging-log4j2/blob/rel/2.25.3/log4j-layout-template-json/src/main/resources/LogstashJsonEventLayoutV1.json This works fine (except for a few log lines at startup that are probably printed by But now I have an error message in my logs: I suspect the reason is that the apiVersion: v1
kind: ConfigMap
data:
cluster.id: gbZ8TcatQ6SYatEUQp4LCg
log4j2.properties: |
# Do not change this generated file. Logging can be configured in the corresponding Kubernetes resource.
name=KafkaConfig
appender.console.type=Console
appender.console.name=STDOUT
appender.console.layout.type=JsonTemplateLayout
appender.console.layout.pattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %c{1}:%L - %m%n
[…]
appender.console.layout.eventTemplate=[…]Is there any way to unset/remove the Thank you in advance! |
Replies: 3 comments 3 replies
|
I tried spec:
kafka:
logging:
loggers:
appender.console.layout.pattern: nil
appender.console.layout.pattern: null
appender.console.layout.pattern: "" |
|
The |
|
@psheichelberg could you please share the full configmap |
The
inlineconfiguration is designed for simple changes such as log levels etc. For more complex changes such as using custom layout, you should use theexternallogging configuration.