- Updated the maximum log file size to 10MB and reduced backup count to 5. - Introduced a `per_run` option to generate independent log files for each run. - Improved log file naming conventions based on the `per_run` setting. - Added support for both size-based and time-based log rotation configurations. - Implemented error handling for OCR click execution in `douyin_helpers.py`. - Added new CSV report for OCR regions and updated logging for click actions. - Introduced a temporary script to check logging configurations and handlers. - Added a new log file for unified logs dated 2025-12-27. - Updated reservations timestamp in JSON state file.
21 lines
981 B
Python
21 lines
981 B
Python
from douyin.logging import douyin_logging
|
|
import logging
|
|
import logging.handlers as lh
|
|
|
|
# Configure logging using current config
|
|
douyin_logging.configure_logging()
|
|
root = logging.getLogger()
|
|
print('handlers:', [type(h).__name__ for h in root.handlers])
|
|
|
|
for h in root.handlers:
|
|
fname = getattr(h, 'baseFilename', getattr(h, 'filename', None))
|
|
print(type(h).__name__, fname)
|
|
# RotatingDatedFileHandler specific
|
|
if hasattr(h, 'max_bytes'):
|
|
print(' max_bytes =', getattr(h, 'max_bytes', None), 'backup_count =', getattr(h, 'backup_count', None))
|
|
# RotatingFileHandler
|
|
if isinstance(h, lh.RotatingFileHandler):
|
|
print(' RotatingFileHandler maxBytes =', getattr(h, 'maxBytes', None), 'backupCount =', getattr(h, 'backupCount', None))
|
|
if isinstance(h, lh.TimedRotatingFileHandler):
|
|
print(' TimedRotating when =', getattr(h, 'when', None), 'interval =', getattr(h, 'interval', None), 'backupCount =', getattr(h, 'backupCount', None))
|