From 68ab4bdfd8690217201b3aa6b60174d77d34f7e2 Mon Sep 17 00:00:00 2001 From: Isaac Benitez Date: Thu, 20 Oct 2022 22:01:17 -0700 Subject: [PATCH 1/2] Make default logging level be consistent with CPython --- adafruit_logging.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/adafruit_logging.py b/adafruit_logging.py index db4b699..1de37fb 100644 --- a/adafruit_logging.py +++ b/adafruit_logging.py @@ -38,15 +38,15 @@ level (00 to 50). The str in each tuple is the string representation of that logging level ("NOTSET" to "CRITICAL"; see below). NOTSET: int - The NOTSET logging level, which is the default logging level that can be - used to indicate that a `Logger` should process any logging messages, - regardless of how severe those messages are. + The NOTSET logging level can be used to indicate that a `Logger` should + process any logging messages, regardless of how severe those messages are. DEBUG: int The DEBUG logging level, which is the lowest (least severe) real level. INFO: int The INFO logging level for informative/informational messages. WARNING: int - The WARNING logging level for warnings that should be addressed/fixed. + The WARNING logging level, which is the default logging level, for warnings + that should be addressed/fixed. ERROR: int The ERROR logging level for Python exceptions that occur during runtime. CRITICAL: int @@ -268,10 +268,10 @@ class Logger: :param Hashable name: The name of the logger, typically assigned by the value from `getLogger`; this is typically a ``str`` - :param int level: (optional) The log level, default is ``NOTSET`` + :param int level: (optional) The log level, default is ``WARNING`` """ - def __init__(self, name: Hashable, level: int = NOTSET) -> None: + def __init__(self, name: Hashable, level: int = WARNING) -> None: """Create an instance.""" self._level = level self.name = name From 6f1b3d503dc8584125b91a011ce40aa726ae92f7 Mon Sep 17 00:00:00 2001 From: Isaac Benitez Date: Thu, 20 Oct 2022 22:13:29 -0700 Subject: [PATCH 2/2] Fix docstring indentation --- adafruit_logging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_logging.py b/adafruit_logging.py index 1de37fb..abd65c5 100644 --- a/adafruit_logging.py +++ b/adafruit_logging.py @@ -45,8 +45,8 @@ INFO: int The INFO logging level for informative/informational messages. WARNING: int - The WARNING logging level, which is the default logging level, for warnings - that should be addressed/fixed. + The WARNING logging level, which is the default logging level, for warnings + that should be addressed/fixed. ERROR: int The ERROR logging level for Python exceptions that occur during runtime. CRITICAL: int