Files
dax-ml/config/logging.yaml

99 lines
2.1 KiB
YAML

version: 1
disable_existing_loggers: false
formatters:
json:
class: pythonjsonlogger.jsonlogger.JsonFormatter
format: '%(asctime)s %(name)s %(levelname)s %(message)s %(pathname)s %(lineno)d'
datefmt: '%Y-%m-%d %H:%M:%S'
detailed:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s - [%(pathname)s:%(lineno)d]'
datefmt: '%Y-%m-%d %H:%M:%S'
colored:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
# Note: ColoredFormatter requires colorlog package
# Falls back to standard formatter if colorlog not available
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: colored
stream: ext://sys.stdout
filters:
- sensitive_data_filter
application_file:
class: logging.handlers.RotatingFileHandler
level: DEBUG
formatter: json
filename: logs/application/app.log
maxBytes: 10485760 # 10MB
backupCount: 5
encoding: utf-8
filters:
- sensitive_data_filter
error_file:
class: logging.handlers.RotatingFileHandler
level: ERROR
formatter: json
filename: logs/errors/exceptions.log
maxBytes: 10485760 # 10MB
backupCount: 5
encoding: utf-8
filters:
- sensitive_data_filter
critical_file:
class: logging.handlers.RotatingFileHandler
level: CRITICAL
formatter: json
filename: logs/errors/critical.log
maxBytes: 10485760 # 10MB
backupCount: 10
encoding: utf-8
filters:
- sensitive_data_filter
loggers:
src:
level: DEBUG
handlers:
- console
- application_file
- error_file
- critical_file
propagate: false
src.detectors:
level: DEBUG
handlers:
- console
- application_file
propagate: false
src.models:
level: DEBUG
handlers:
- console
- application_file
propagate: false
src.trading:
level: INFO
handlers:
- console
- application_file
propagate: false
root:
level: INFO
handlers:
- console
- application_file