Hi, in the documentation, we see that "dagster.get...
# ask-community
Hi, in the documentation, we see that "dagster.get_dagster_logger()" is a convenient alternative to "context.log.info" for most cases. What would be some situation where "context.log.info" cannot be replaced with "dagster.get_dagster_logger()", or the pros and cons of using each? Is there a recommended style that the Dagster community prefers? Documentation: https://docs.dagster.io/_apidocs/utilities#dagster.get_dagster_logger
dagster bot responded by community 1
🤖 1
I don't think it matters. I use
when I'm a few function calls deep and don't have easy access to the context / don't want to pass a logger variable through multiple layers of functions, and I know that the code isn't going to be used outside the context of Dagster. But functionally they're the same, I think they just use the normal python
method to retrieve the same logging instance.
Zach is correct. The primary purpose of
is to save users the trouble of threading
into subroutines called in a compute/materialize function.