Is there a reference logging implementation we can use as an example?

I am looking for a really nice use of logging module implementation inside a library/cli tools package, one that addresses common issues which are included in python logging documentation, like:

  • logger name, singleton, avoiding cyclic imports
  • how to initialize the logger instance, how to
  • address cli tool chicken and the egg issue around loading configuration, where you want to log something while the logger may not have being initialized because verbosity can be specified inside the config

I am asking these because these are common issues I keep encountering on various projects, with maintainers having divergent ideas. If we would have one or a few examples that we consider state-of-the art implementations, it would be much easier to offer them as examples.

1 Like