<@U078Y59KC3B> How can I set JSON as the log forma...
# ask-ai
t
@RunLLM How can I set JSON as the log format in Pulsar
4.0.9
?
r
To set JSON as the log format in Pulsar 4.0.9, configure the log format using the
logConfig
field in your component (e.g., broker) configuration. Set
format: "json"
under
logConfig
. For example:
Copy code
broker:
  logConfig:
    level: "INFO"
    format: "json"
    template: {}
This will apply JSON formatting to logs. You can also fully customize the log4j2 config using the
template
field if needed. For more details, see StreamNative documentation and log format reference. Would you like more detail on customizing the log template or applying this to other components? Sources: - Configure Log Format - Log format - StreamNative Docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
t
Answer is incorrect. For future references, I found that we can set this in the
*.configData
chart values
Copy code
PULSAR_ROUTING_APPENDER_DEFAULT: "ConsoleJson"