doc: fixed logging example

This commit is contained in:
Éloi Rivard 2024-03-30 11:40:05 +01:00
parent 06049d27a4
commit f2dbda8c89
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184

View file

@ -267,26 +267,15 @@ class CoreSettings(BaseModel):
For example:: For example::
[CANAILLE] [CANAILLE.LOGGING]
LOGGING = { version = 1
version = 1, formatters.default.format = "[%(asctime)s] %(levelname)s in %(module)s: %(message)s"
formatters = { root = {level = "INFO", handlers = ["canaille"]}
default = {
format = "[%(asctime)s] %(levelname)s in %(module)s: %(message)s", [CANAILLE.LOGGING.handlers.canaille]
}, class = "logging.handlers.WatchedFileHandler"
}, filename = "/var/log/canaille.log"
handlers = { formatter = "default"
canaille = {
class = "logging.handlers.WatchedFileHandler",
filename = "/foo/bar/canaille.log",
formatter = "default",
}
},
root = {
level = "INFO",
handlers = ["canaille"],
},
}
""" """
SMTP: Optional[SMTPSettings] = None SMTP: Optional[SMTPSettings] = None