Library Logging - abstractfactory/labs GitHub Wiki
A library SHOULD NOT append a handler to logging.
Pros
- Library is unobtrusive; i.e. it doesn't interfere with higher-level application logging
Cons
- Client must append handler of pre-determined name
- If no handler is appended, errors are thrown
A library SHOULD append a handler to logging.
Pros
- Library reports relevant messages
- Handler can be accessed via
logging.getLogger(<name>)
Cons
- With many libraries, logging may be substantial
Libraries that do provide handlers out of the box.