Can you customize the logging format of the Prefec...
# ask-community
m
Can you customize the logging format of the Prefect Agent? I put the logs into Datadog and i’d rather not do a bunch of parsing. Structured logging would be fantastic
1
m
@Mike O'Connor you can provide a custom logging.yml file to do this I believe. https://docs.prefect.io/concepts/logs/#logging-configuration it should support any python configuration options available here https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig
m
Great! Thank you! So i’ve got the agent to now use the
json
formatting, which is great. But, the prefect agent seems to also print the logs from the infrastructure (i.e. kubernetes) , which of course are not using json formatting. Can i disable showing these logs in the agent (given they are shown in the infrastructure logs and in prefect cloud)?