mirror of
https://github.com/norohind/jubilant-system.git
synced 2025-04-23 01:00:28 +03:00
Set logging level by env var JUBILANT_LOG_LEVEL, default is DEBUG
This commit is contained in:
parent
648ade5f32
commit
67cec682a2
@ -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__
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user