Is there anyway to get a normal `context.log` to d...
# ask-community
n
Is there anyway to get a normal
context.log
to display a pretty table of info (like an
AssetObservation
can with the
metadata
property)? I am logging some configuration details when instantiating a resource and would like to use the tabular log display in Dagit if possible.
c
You could yield metadata in an asset observation or materialization. The context.log object is a standard python logger, so the functionality there is limited to the contents that can be logged via a logger. To my knowledge this doesn't include structured objects.
n
In this case I cannot use anything asset or ExpectationResult related, as this is a resource being instantiated and then passed into a Definition. It would be nice to have a method to do richer Dagit UI logging outside of ExpectationResult/AssetObservation type events.
c
Unfortunately I don't believe we support this at the moment. We do have an issue for tracking: https://github.com/dagster-io/dagster/issues/4082
n
Great, thank you for the issue link! 🙂