refactor: unify logging to standard logging.getLogger(__name__) pattern

Replace custom get_logger() wrapper with standard Python logging pattern
across executor.py and quarantine.py. Remove dead logger imports from
reports.py. Remove get_logger() function from logging_config.py and its
tests. Reduces logging patterns from 2 to 1.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
windyboy
2026-09-27 10:53:56 +08:00
co-authored by Claude Sonnet 4.5
parent fe03a31dd4
commit 8832f5da3f
5 changed files with 4 additions and 45 deletions
-23
View File
@@ -8,7 +8,6 @@ import pytest
from vlm.logging_config import (
MAX_LOG_SIZE,
default_log_dir,
get_logger,
log_operation,
setup_logging,
)
@@ -239,28 +238,6 @@ class TestLogRotation:
assert log_file.stat().st_size < MAX_LOG_SIZE
class TestGetLogger:
"""Test get_logger function."""
def test_get_logger_returns_logger(self):
"""Test that get_logger returns a logger instance."""
logger = get_logger()
assert logger is not None
assert logger.name == "vlm"
def test_get_logger_creates_default_config(self):
"""Test that get_logger creates default configuration if needed."""
# Clear any existing handlers
logger = logging.getLogger("vlm")
logger.handlers.clear()
# Get logger should set up default configuration
logger = get_logger()
assert len(logger.handlers) > 0
class TestLogOperation:
"""Test log_operation helper function."""