mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
iwyu
This commit is contained in:
parent
dadbe750cc
commit
6962810210
1 changed files with 15 additions and 0 deletions
15
copanier/loggers.py
Normal file
15
copanier/loggers.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
|
||||
from . import config
|
||||
|
||||
request_logger = logging.getLogger("request_logger")
|
||||
request_logger.setLevel(logging.INFO)
|
||||
request_logger.addHandler(
|
||||
logging.handlers.TimedRotatingFileHandler(
|
||||
os.path.join(config.LOG_ROOT, "copanier-requests.log"),
|
||||
when="midnight",
|
||||
backupCount=10,
|
||||
)
|
||||
)
|
Loading…
Reference in a new issue