mirror of
https://github.com/norohind/jubilant-system.git
synced 2026-11-30 02:32:01 +03:00
Set logging level by env var JUBILANT_LOG_LEVEL, default is DEBUG
This commit is contained in:
1 file changed
+2
-1
+2
-1
@@ -38,6 +38,7 @@ To utilise logging in a 'found' (third-party) plugin, include this:
|
||||
import inspect
|
||||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
from contextlib import suppress
|
||||
from fnmatch import fnmatch
|
||||
# So that any warning about accessing a protected member is only in one place.
|
||||
@@ -439,7 +440,7 @@ def get_main_logger(sublogger_name: str = '') -> 'LoggerMixin':
|
||||
|
||||
|
||||
# Singleton
|
||||
loglevel = logging.DEBUG
|
||||
loglevel = logging._nameToLevel.get(os.getenv('JUBILANT_LOG_LEVEL').upper(), logging.DEBUG) # noqa:
|
||||
|
||||
base_logger_name = __name__
|
||||
|
||||
|
||||
Reference in new issue
Block a user