>> On a slightly tangential note, what do you think of the idea of >> library code including info or debug level logging? In effect, >> tracing and diagnostic code built in and available simply by changing >> the logging level? Vinay> That's how it works right now. You get info() and debug() Vinay> messages sent via calls in library code, just by changing the Vinay> level of (say) the root logger. There can be performance implications if you log heavily. I don't know how the code is organized, but functionally these two calls are equivalent: >>> logging.error("error 1 2 3 %s" % "yup") ERROR:root:error 1 2 3 yup >>> logging.error("error 1 2 3 %s", "yup") ERROR:root:error 1 2 3 yup The second form should be preferred in library code as long as the format string expansion is deferred until after the test is made to emit the message. Skip
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4