mirror of
https://github.com/ep1cman/unifi-protect-backup.git
synced 2025-12-05 23:53:30 +00:00
Fix logging padding
This commit is contained in:
@@ -214,7 +214,7 @@ def setup_logging(verbosity: int, color_logging: bool = False) -> None:
|
|||||||
logging.DEBUG - 2,
|
logging.DEBUG - 2,
|
||||||
)
|
)
|
||||||
|
|
||||||
format = "{asctime} [{levelname:^11s}] {name:<42} : {message}"
|
format = "{asctime} [{levelname:^11s}] {name:<46} : {message}"
|
||||||
sh = create_logging_handler(format, color_logging)
|
sh = create_logging_handler(format, color_logging)
|
||||||
|
|
||||||
logger = logging.getLogger("unifi_protect_backup")
|
logger = logging.getLogger("unifi_protect_backup")
|
||||||
@@ -248,7 +248,7 @@ def setup_event_logger(logger, color_logging):
|
|||||||
"""Set up a logger that also displays the event ID currently being processed."""
|
"""Set up a logger that also displays the event ID currently being processed."""
|
||||||
global _initialized_loggers
|
global _initialized_loggers
|
||||||
if logger not in _initialized_loggers:
|
if logger not in _initialized_loggers:
|
||||||
format = "{asctime} [{levelname:^11s}] {name:<42} :{event} {message}"
|
format = "{asctime} [{levelname:^11s}] {name:<46} :{event} {message}"
|
||||||
sh = create_logging_handler(format, color_logging)
|
sh = create_logging_handler(format, color_logging)
|
||||||
logger.addHandler(sh)
|
logger.addHandler(sh)
|
||||||
logger.propagate = False
|
logger.propagate = False
|
||||||
|
|||||||
Reference in New Issue
Block a user