Sync from development - prepare for v0.1.2

This commit is contained in:
Omni
2025-09-18 08:18:59 +01:00
parent 70b18004e1
commit 1cd4caf04b
61 changed files with 1349 additions and 503 deletions

View File

@@ -14,15 +14,21 @@ import shutil
class LoggingHandler:
"""
Central logging handler for Jackify.
- Uses ~/Jackify/logs/ as the log directory.
- Uses configurable Jackify data directory for logs (default: ~/Jackify/logs/).
- Supports per-function log files (e.g., jackify-install-wabbajack.log).
- Handles log rotation and log directory creation.
Usage:
logger = LoggingHandler().setup_logger('install_wabbajack', 'jackify-install-wabbajack.log')
"""
def __init__(self):
self.log_dir = Path.home() / "Jackify" / "logs"
# Don't cache log_dir - use property to get fresh path each time
self.ensure_log_directory()
@property
def log_dir(self):
"""Get the current log directory (may change if config updated)."""
from jackify.shared.paths import get_jackify_logs_dir
return get_jackify_logs_dir()
def ensure_log_directory(self) -> None:
"""Ensure the log directory exists."""