Hi All, How do I include default loggers to be lo...
# prefect-community
Hi All, How do I include default loggers to be logged in the prefect UI? Right now I have a function that setup logs, for example
Copy code
def setup_logs():
    # Example config
    'root': {
            'level': 'DEBUG',
            'handlers': [

class DoSomething():
    def run(self):
The logging configurations sets up a default logger to stdout, a file handler, and also to a 3rd party log streaming service using fluent. I see the local file output, but not through the prefect UI.
Copy code

extra_loggers = "['root']"
I have setup a toml file, and tried to set the environmental variable before running the agent, and the flow itself. However I still do not see the logs in the prefect UI. Is there something else I need to do?
Hi Max - I’m not sure I follow your example, but in general, the
configuration will add the appropriate logging handlers to your loggers at the first import-time of Prefect. Instead of creating an entirely new logger to re-route logs to a third party service, I recommend adding your additional handlers to the root prefect logger (which is already configured for the Prefect API):
Copy code
prefect_logger = prefect.utilities.configuration.logging.get_logger()

# add additional handlers to the prefect logger here