forked from Mirror/pmbootstrap
pmb.helpers.logging: Use PEP 8-compliant naming (MR 2537)
See https://docs.astral.sh/ruff/rules/invalid-class-name
This commit is contained in:
parent
97da7ebe4e
commit
1965818fae
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ NOTSET: Final[int] = logging.NOTSET
|
|||
VERBOSE: Final[int] = 5
|
||||
|
||||
|
||||
class log_handler(logging.StreamHandler):
|
||||
class LogHandler(logging.StreamHandler):
|
||||
"""Write to stdout and to the already opened log file."""
|
||||
|
||||
def __init__(self, details_to_stdout: bool = False, quiet: bool = False) -> None:
|
||||
|
@ -148,7 +148,7 @@ def init(logfile: Path, verbose: bool, details_to_stdout: bool = False) -> None:
|
|||
root_logger.setLevel(VERBOSE)
|
||||
|
||||
# Add a custom log handler
|
||||
handler = log_handler(details_to_stdout=details_to_stdout)
|
||||
handler = LogHandler(details_to_stdout=details_to_stdout)
|
||||
handler.setFormatter(formatter)
|
||||
root_logger.addHandler(handler)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue