version: 1
disable_existing_loggers: True

formatters:
  colored:
    (): colorlog.ColoredFormatter
    format: "%(log_color)s[%(asctime)s] %(filename)s.%(funcName)s:%(lineno)s %(blue)s%(message)s"
    datefmt: "%H:%M:%S"
  syslog:
    format: "[%(name)s] %(filename)s:%(lineno)s %(leveltag)s: %(message)s"

filters:
  leveltag:
    (): log.LevelTagFilter
  category_filter:
    (): log.FunctionFilter
    module_functions:
      # Optionally additionally log some debug calls to stderr
      # log all debug calls in a module:
      #    module-name: []
      # log debug calls for some functions in a module:
      #    module-name:
      #    - function-name-1
      #    - function-name-2
      musicmuster:
        - update_clocks
        - play_next

handlers:
  stderr:
    class: colorlog.StreamHandler
    level: INFO
    formatter: colored
    filters: [leveltag]
    stream: ext://sys.stderr

  syslog:
    class: logging.handlers.SysLogHandler
    level: DEBUG
    formatter: syslog
    filters: [leveltag]
    address: "/dev/log"

  debug_stderr:
    class: colorlog.StreamHandler
    level: DEBUG
    formatter: colored
    filters: [leveltag, category_filter]
    stream: ext://sys.stderr

loggers:
  musicmuster:
    level: DEBUG
    handlers: [stderr, syslog, debug_stderr]
    propagate: false 
