Skip to content

Make default logging level be consistent with CPython #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions adafruit_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down