mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-11-22 07:26:31 +03:00
Fix verbose logging change needed full restart
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Shared construction and formatting of the rotating log file handler.
|
||||
"""Shared logging setup for the tray and CLI.
|
||||
|
||||
Centralizes the rotation invariant so both the tray and the CLI log paths
|
||||
behave identically and the file can never grow without bound (issue #885).
|
||||
@@ -18,6 +18,10 @@ _MIN_BYTES = 32 * 1024
|
||||
_MIN_BACKUPS = 1
|
||||
|
||||
|
||||
def set_verbose_logging(verbose: bool) -> None:
|
||||
logging.getLogger().setLevel(logging.DEBUG if verbose else logging.INFO)
|
||||
|
||||
|
||||
def build_log_handler(
|
||||
path: str,
|
||||
log_max_mb: float = 5,
|
||||
|
||||
Reference in New Issue
Block a user