HK3-Lab-Team / pytrousse

PyTrousse collects into one toolbox a set of data wrangling procedures tailored for composing reproducible analytics pipelines.
Apache License 2.0
0 stars 1 forks source link

Create a custom Logger instance instead of using `root` one #104

Open lorenz-gorini opened 3 years ago

lorenz-gorini commented 3 years ago

In pytrousse repo, the root Logger instance is used in each module. This may prevent the pytrousse user to set up a custom logger for pytrousse package, without modifying the root logging instance.

A possible solution could be to create a unique custom logger for pytrousse package that is used by each module, inserting at the beginning of each module the following line:

logger = logging.getLogger(TROUSSE_LOGGER_NAME)

and replacing each root logging instance call with logger one. For example:

logging.info("My message")

could be replaced by:

logger.info("My message")