fix: drop _file_handler's unused name parameter
leftover from the v0.5.0 history-namespace split - every path inside _file_handler already uses live_path/history_stem/log_dir, never name. the docstring still explained it as "the LIVE stem" though nothing read it. Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
@@ -144,14 +144,14 @@ def _history_stem() -> str:
|
||||
|
||||
|
||||
def _file_handler(
|
||||
name: str, history_stem: str, live_path: str, log_dir: str, rotate: Optional[str],
|
||||
history_stem: str, live_path: str, log_dir: str, rotate: Optional[str],
|
||||
backup_count: int, max_bytes: int, compress: bool,
|
||||
keep_uncompressed: Optional[int], keep_compressed: Optional[int], warnings: list,
|
||||
) -> logging.Handler:
|
||||
"""build the configured file handler with custom rolling into log_dir
|
||||
|
||||
`name` is the LIVE stem; `history_stem` is the PROJECT stem that rolled/historic
|
||||
files are named off, decoupled from the live file's own name.
|
||||
`history_stem` is the PROJECT stem that rolled/historic files are named off,
|
||||
decoupled from the live file's own name (`live_path`).
|
||||
"""
|
||||
tiered = keep_uncompressed is not None or keep_compressed is not None
|
||||
if rotate == "size":
|
||||
@@ -285,7 +285,7 @@ def setup_logging(
|
||||
if file_ok:
|
||||
try:
|
||||
fh = _file_handler(
|
||||
stem, history_stem, live_path, log_dir, rotate, backup_count, max_bytes, compress,
|
||||
history_stem, live_path, log_dir, rotate, backup_count, max_bytes, compress,
|
||||
keep_uncompressed, keep_compressed, warnings,
|
||||
)
|
||||
fh.setFormatter(formatter)
|
||||
|
||||
Reference in New Issue
Block a user