Files
python/tempbox/src/modules/tempbox_logger.py

18 lines
414 B
Python
Raw Normal View History

2025-09-27 17:31:58 +02:00
import logging
from pathlib import Path
log_dir = Path.home() / ".local" / "share" / "tempbox"
log_dir.mkdir(parents=True, exist_ok=True)
log_file = log_dir / "tempbox.log"
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(levelname)s - %(message)s",
filename=log_file,
)
logger = logging.getLogger()
2025-09-28 09:25:08 +02:00
# logger.debug(f"Log path:\t{log_dir}")
# logger.debug(f"Log file:\t{log_file}")