sn-platform 1.11 added a new feature called the logConfig which can be used to change the log level and log format of zookeeper, bookkeeper, broker and proxy. If logConfig field is configured, the component will use the mount path /mnt/conf/log4j2.yaml to mount the log configuration file, and can dynamically change the log level and log format of the component.
To use the
logConfig feature, you need to make sure already installed the pulsar-operator after 0.17.logConfig field has three subfields:
levelformattemplate
level
The level field can be used to change the log level of the component. The value can be one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF.
format
The format field can be used to change the log format of the component. The value can be one of json, text.
template
The template field can totally replace the log4j2 config of the component, which would be useful if you need some customization more than level and format. The value of template is a string, which is the content of the log4j2 config file in yaml format.