You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Singer-Python is the root repo for pretty much every tap and target, and the suggested way to log "out" is to use singer.get_logger() or one of the helpers of log_info, or...log_debug.
For target-postgres we use the DEBUG level for logging in tests, and for gaining more information for issues/bug reports etc.
To enable DEBUG logging, we have a single call out to singer.get_logger() followed up by setLevel('DEBUG') (loosely). This works pretty well up until get_logger() gets called again.
Once get_logger gets called again, the fileConfig code gets run again, and the root logger gets reset to the logging.conf and having the level set to INFO.
@AlexanderMann Thanks for raising this. I've chatted with the team and we do think this is unexpected behavior and could be a bug. The team would welcome a PR if the is something you want to take a crack at resolving.
Considering how many other repos use this package, I'd not dare to introduce a breaking change here, but would you be open to a PR that allows overriding the log level here via some env var that's unlikely to be used elsewhere, say SINGER_LOGLEVEL for instance. If not set, nothing changes, but it allows users to opt-in to a cleaner behaviour.
Problem
Singer-Python
is the root repo for pretty much everytap
andtarget
, and the suggested way to log "out" is to usesinger.get_logger()
or one of the helpers oflog_info
, or...log_debug
.For
target-postgres
we use theDEBUG
level for logging in tests, and for gaining more information for issues/bug reports etc.To enable
DEBUG
logging, we have a single call out tosinger.get_logger()
followed up bysetLevel('DEBUG')
(loosely). This works pretty well up untilget_logger()
gets called again.Once
get_logger
gets called again, thefileConfig
code gets run again, and the root logger gets reset to thelogging.conf
and having the level set toINFO
.Once this happens,
log_debug
no longer works.Question
Is there a suggested way to use/get
DEBUG
output while also leveragingsinger-python
?...or...
Is this a 🐛?
Suggested Musical Pairing
https://soundcloud.com/winnetka-bowling-league/slow-dances
The text was updated successfully, but these errors were encountered: