Is there a way to write prefect logs to a file, di...
# prefect-community
Is there a way to write prefect logs to a file, different for each wokrqueue ? I am referring to this prefect doc
Hi Khyaati, If you have a separate agent per work-queue, you can configure it at each agent
Or if you know ahead of time, you can create custom log files, for each work queue
It’s up to you how you want to isolate / segment the logging
This article just discusses how to go about doing so, but if you want a file for say
, then you can create a logging definition with a filename
and so on for the other work-queues
But the setting is configured globally right ?
Copy code
Note that you'll need to use your custom logging configuration anywhere you want Prefect to log to the filesystem. This may include servers where you run Prefect Orion or a Prefect agent, or containers
it’s global per configuration, if you want per workqueue, then
would have tags and labels to go to
with a logging definition on that agent, and
should be configured to go to another agent with another definition