A custom configuration
Explore sample configurations and explaination on how we manage our log
tentacle = Tentacle(path='myconf.yaml')Yeah, but how the YAML looks like?
version: 1
disable_existing_loggers: false
formatters:
defaultFormatter:
format: '%(asctime)s - %(filename)s - %(levelname)s - %(name)s - %(message)s'
handlers:
console:
class: logging.StreamHandler
level: DEBUG
formatter: defaultFormatter
file:
class: logging.handlers.TimedRotatingFileHandler
level: INFO
formatter: defaultFormatter
filename: ./logs/log.log
when: midnight
interval: 15
backupCount: 0
loggers:
root:
level: DEBUG
handlers: [console, file]
propagate: no
coloredlogs:
active: true
formatter: defaultFormatterLast updated
Was this helpful?