AFAIK the logs are stored in the database right? I...
# prefect-server
j
AFAIK the logs are stored in the database right? If I want to move that to a different backend (google bucket or stackdriver), are the logs then still retrievable from the UI? Or are there building blocks to implement that?
z
I think you’d have to overload the graphql resolvers for log retrieval operations
And the backend api
create_logs
function
p
I also have a log-related question. What is the best way to redirect logs to a file in json format? I am using the docker-compose single-node setup.
z
I would add a handler to the prefect logger with a json log formatter (e.g. https://github.com/madzak/python-json-logger)
p
Thanks, Michael. Is there any documentation explaining where to do this in prefect? I remember seeing some config keys related to logging, but I don't remember seeing instructions on how to set it up.
j
Hmm, okay, maybe something for later then 😅 Thanks 🙂