Run with python -m src. No environment is needed.
Logging here is configured to do the following:
- Logs from the last run are saved in
logsfolder. Whereas accumulated historical logs are inhistory_logsfolder. - Main logs are logged into
src.logfile, and logs with detailed information from auxiliary modules can be found in the auxiliary (detailed) log files. Both, main and detailed logs are streamed intostdout.
Followed the exampled from here https://docs.python.org/3/howto/logging-cookbook.html#using-logging-in-multiple-modules.
Минусы этого решения:
- В консоль печатается лог "NEW RUN" во время импорта вспомогательных модулей.
- В файлах
.logвспомогательных модулей не всегда на будет понятно, из какого места была вызвана функция библиотеки.