Commit 33e38a01 authored by David Foucher's avatar David Foucher

WIP gunicorn log

parent f2401ea7
...@@ -136,7 +136,6 @@ class Financement(SmartDict): ...@@ -136,7 +136,6 @@ class Financement(SmartDict):
"remuneration_texte", "remuneration_texte",
"prise_en_charge_texte", "prise_en_charge_texte",
]: ]:
print(self)
setattr(self, key, (getattr(self, key) or "").format(**self)) setattr(self, key, (getattr(self, key) or "").format(**self))
......
from datetime import datetime from datetime import datetime
import logging import logging
import logging.handlers
import os import os
import ujson as json import ujson as json
...@@ -14,13 +13,11 @@ logger.addHandler(logging.StreamHandler()) ...@@ -14,13 +13,11 @@ logger.addHandler(logging.StreamHandler())
request_logger = logging.getLogger("request_logger") request_logger = logging.getLogger("request_logger")
request_logger.setLevel(logging.INFO) request_logger.setLevel(logging.INFO)
request_logger.addHandler( request_logger.addHandler(
logging.handlers.TimedRotatingFileHandler( logging.FileHandler(
os.path.join( os.path.join(
os.environ.get("TREFLE_LOG_DIR", "/tmp"), os.environ.get("TREFLE_LOG_DIR", "/tmp"),
"trefle-simulate.log", "trefle-simulate.log",
), ),
when="D",
backupCount=365,
) )
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment