Description
PyEmu
implements a custom logger to log messages from various parts of the package. Python comes with a logging
module that provides the same functionality, and more. Also, PstFrom
is currently hardcoded to log to a file in the current working directory, as well as an optional logging to stdout
. I'm using pyemu
within a snakemake
workflow, with log files being stored in a dedicated directory, so I would like to be able to specify how and where the messages are logged. The standard library also provides means to configure different log levels for different streams (for example debug and info messages only to file, but warnings and errors also to the screen, or even custom log handlers).
Would you guys be open to a pull request that replaces the current logger with the built-in logging
interface? It would mean that some options need to be removed, such as the echo
argument to various helpers. We would also need to add a small tutorial for people who would like to keep the current functionality of logging to both a file and stdout, but in return the users get more flexibility both in what is logged as well as how it is logged. This removes some (in my humble opinion ;-) ) unneccessarily opnionated implementation from library code, which makes the library more pythonic.