Page MenuHomeElementl

handlers instead of loggers inside DagsterLogManager
Changes PlannedPublicDraft

Authored by sandyryza on Jun 8 2021, 9:15 PM.

Details

Summary

In Python logging, "loggers" are basically sources and "handlers" are basically sinks.

This makes it a little weird that DagsterLogManager, which is responsible for routing log messages to a set of sinks, contains a list of loggers, not a list of handlers. This weirdness is reflected in the implementations of most of the built-in Dagster LoggerDefinitions: they essentially create a handler, which contains the meat of the custom behavior, and then wrap it in a vanilla logger.

This is not a user-facing API change. However, it makes it possible to add new logging APIs that don't require users to wrap their handlers in loggers.

I am relatively new to Python logging, so please let me know if I'm misunderstanding something crucial.

Test Plan

bk

Diff Detail

Repository
R1 dagster
Branch
log-handlers (branched from master)
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 8 2021, 9:36 PM
Harbormaster failed remote builds in B31831: Diff 39200!
Harbormaster returned this revision to the author for changes because remote builds failed.Jun 8 2021, 10:36 PM
Harbormaster failed remote builds in B31846: Diff 39218!