refactor: share env-bool parsing and logging setup
env_utils.env_bool replaces duplicated truthy parsing in config and rembg_cli. logging_config.configure_logging unifies entry-point setup. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
"""Shared logging setup for entry-point modules."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
_LOG_FORMAT = "%(asctime)s %(levelname)s [%(name)s] %(message)s"
|
||||
|
||||
|
||||
def configure_logging(level: int = logging.INFO) -> None:
|
||||
logging.basicConfig(level=level, format=_LOG_FORMAT)
|
||||
Reference in New Issue
Block a user