How can I get logs from non-ops to show up in dagi...
# ask-community
e
How can I get logs from non-ops to show up in dagit? I import a class in my pipeline which sets
logger = logging.getLogger(__file__)
and
logger.setLevel("INFO")
. It then proceeds to log things within its methods using
<http://logger.info|logger.info>()
. However, when I call these methods from my ops, I don't see these logs showing up in the UI
dagster bot responded by community 1
d
you might be looking for
<http://context.log.info|context.log.info>
. You need to declare
context
as an argument
e
Thanks Drew, but I'm referring to the logs being generated by imported classes, not my own ops. So I'm not able to update the way these classes are logging information
z
you might be looking for this doc on capturing python logs
🙌 1