Dependency injection: overriding defaults
Victor Porton
porton at narod.ru
Thu Feb 1 01:01:07 EST 2018
I am writing a library, a command line utility which uses the library, and a
daemon which uses the library.
I am going to use dependency_injector package.
Consider loggers:
For the core library the logger should default to stderr.
For the command line utility, we use the default logger of the library.
For the server, the log should go to a file (not to stderr).
Question: How to profoundly make my software to use the appropriate logger,
dependently on whether it is a command line utility or the daemon?
--
Victor Porton - http://portonvictor.org
More information about the Python-list
mailing list