-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextLog
integrations with native loggers
#3522
Conversation
154a8a0
to
5da01af
Compare
9bfd781
to
a4aaa67
Compare
`FileSink` currently ignores flushing requests, which leads to [very hard to track down issues where data is silently dropped even though you're really really trying very hard to flush that dang RecordingStream](#3522 (comment)). - Unblocks #3522
This reverts commit a8fa8c1.
a4aaa67
to
2efc524
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great!
""" Designates very low priority, often extremely verbose, information. """ | ||
|
||
@staticmethod | ||
def deferred_patch_class(cls: Any) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it somehow guaranteed that this runs before other classes are initialized? In particular I'm concerned that LoggingHandler
's LVL2NAME
dictionary may still read the none values, not the strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deferred_patch_class
is called as part of the global import scope, so it should be guaranteed as far as I know yes.
log::Level::Debug => TextLogLevel::DEBUG, | ||
log::Level::Trace => TextLogLevel::TRACE, | ||
} | ||
.into() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary .into()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextLogLevel::TRACE
& friends are actually &str
s because TextLogLevel
isn't const
Everything to seamlessly integrate
TextLog
with native loggers in Python & Rust.How-to guide
Requires Make
FileSink
actually flush its data when asked to #3525Fixes
TextLog
integration with native logging tools #3450Checklist