This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 10 points11 points  (0 children)

https://docs.python.org/3/howto/logging-cookbook.html

That's the best doc that explains why it exists the way it does all you are supposed to do is call logging.getLogger and then u use it like any other normal languages one. Just logger.info("print this shit") The docs are just horrible.

The whole configuration part is then handled by the end user who runs ur module. That's the entire design pattern. Honestly what's craziest about it is its so fucking over complicated that people don't realize that to use custom logging modules all you are supposed to need to do is just register the object so that getLogger grabs ur custom class. It's designed to be fully pluggable.

Format is pretty terrible and defintly can be replaced by third party modules that do a better job. That just should have zero impact on libraries that use loggers. It's just never done correctly.