blakeblackshear.frigate/frigate/config/logger.py
Nicolas Mowen f36e7430ae
Fix logging (#14079)
* Fix log level setting

* fix app.py mypy issues
2024-09-30 17:45:22 -05:00

23 lines
506 B
Python

from enum import Enum
from pydantic import Field
from .base import FrigateBaseModel
__all__ = ["LoggerConfig", "LogLevel"]
class LogLevel(str, Enum):
debug = "debug"
info = "info"
warning = "warning"
error = "error"
critical = "critical"
class LoggerConfig(FrigateBaseModel):
default: LogLevel = Field(default=LogLevel.info, title="Default logging level.")
logs: dict[str, LogLevel] = Field(
default_factory=dict, title="Log level for specified processes."
)