version: 1

custom_levels:
  OBSERVATION: 25
  ACTION: 26

formatters:
  # Console output
  colored:
    (): "colorlog.ColoredFormatter"
    format: "{log_color}{asctime}.{msecs:03.0f} | {levelname:11} | {name:70} | {message}"
    style: "{"
    datefmt: "%H:%M:%S"

  # User-facing UI (structured JSON)
  json_experiment:
    (): "pythonjsonlogger.jsonlogger.JsonFormatter"
    format: "{name} {levelname} {levelno} {message} {created} {relativeCreated}"
    style: "{"

handlers:
  console:
    class: logging.StreamHandler
    level: DEBUG
    formatter: colored
    stream: ext://sys.stdout
  ui:
    class: zmq.log.handlers.PUBHandler
    level: DEBUG
    formatter: json_experiment

# Level of external libraries
root:
  level: WARN
  handlers: [console]

loggers:
  control_backend:
    level: DEBUG
    handlers: [ui]
