42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
# radian/config/logging_config.py
|
|
|
|
import logging
|
|
|
|
# Configuration dictionary for the RADIAN logging system.
|
|
LOGGING_CONFIG = {
|
|
# The default level for the root logger. All messages at this level or higher
|
|
# from any module will be processed.
|
|
"default_root_level": logging.DEBUG,
|
|
|
|
# Set specific logging levels for noisy modules to avoid clutter.
|
|
# For example, to silence a verbose library:
|
|
# "specific_levels": {
|
|
# "noisy_library_name": logging.WARNING,
|
|
# },
|
|
"specific_levels": {},
|
|
|
|
# The format for all log messages.
|
|
"format": "%(asctime)s [%(levelname)-8s] %(name)-30s : %(message)s",
|
|
"date_format": "%Y-%m-%d %H:%M:%S",
|
|
|
|
# --- Console Handler Configuration ---
|
|
"enable_console": True,
|
|
|
|
# --- File Handler Configuration ---
|
|
"enable_file": True,
|
|
"file_path": "radian_app.log", # Log file name
|
|
"file_max_bytes": 5 * 1024 * 1024, # 5 MB
|
|
"file_backup_count": 3,
|
|
|
|
# --- Tkinter Handler Configuration ---
|
|
# Colors for different log levels in the GUI log widget.
|
|
"colors": {
|
|
logging.DEBUG: "gray",
|
|
logging.INFO: "black",
|
|
logging.WARNING: "orange",
|
|
logging.ERROR: "red",
|
|
logging.CRITICAL: "purple",
|
|
},
|
|
# How often the Tkinter handler's internal queue is checked.
|
|
"queue_poll_interval_ms": 100,
|
|
} |