Linux Signals for Laymen
typh.com1 pointsby jwpeddle0 comments
- Why is your example logger named d? It might seem nitpicky but it's hard
to read an example with a meaningless single character variable.
- "d.close() # stop logging" - what is this? What does it mean to "stop
logging" and why do I want to?
- "Add a coroutine" - I would wager the lay Python developer doesn't even
know what this word means.
- lggr.Lggr() - Why not just name the class Logger?
- The default format variables are inconsistent about when words are
separated with an underscore.
- I can't make sense of the example logging calls. In one you pass a
dictionary as the second argument, in another you pass three strings as
separate arguments. Why would anyone pass a message like this instead of
just using standard string formatting? Especially when there's other
legit arguments like extra. It's not even really clear why you'd want to
pass something in extra instead of in the message.
I fully support your goal, but at a glance this seems like a confusing alternative
to logging.