version: 1
disable_existing_loggers: false

formatters:
  default:
    format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"

handlers:
  file:
    class: logging.FileHandler
    filename: app/logs/server.log
    formatter: default
    level: INFO
  console:
    class: logging.StreamHandler
    formatter: default
    level: INFO

loggers:
  uvicorn:
    handlers: [file, console]
    level: INFO
    propagate: false
  uvicorn.access:
    handlers: [file, console]
    level: INFO
    propagate: false
  uvicorn.error:
    handlers: [file, console]
    level: ERROR
    propagate: false
  app:
    handlers: [file, console]
    level: INFO
    propagate: false

root:
  handlers: [file, console]
  level: INFO