Hi all! In one of my prefect tasks I am capturing ...
# ask-community
p
Hi all! In one of my prefect tasks I am capturing all stdout because I am importing a class from another module which uses logging.py to log, I am trying to caputure the log statements but this isn't working, any thoughts? None of the log_levels are being captured by the prefect task. Wondering if I'll have to import the prefect logger somehow in this module as well.
k
Hi @Parth Patel, have you seen this part of the docs?
p
ahhh in the extra_loggers section can I putting in 'logging' if we're using the python builtin logging library
k
You add the logger of the module you are importing. Yes it should work. The Prefect logger is a built-in logger too
See Michael’s example here