Procházet zdrojové kódy

fix: fix the formatter is not applied on log file (#12704)

tags/0.15.3
Yingchun Lai před 9 měsíci
rodič
revize
23c68efa2d
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 1 přidání a 2 odebrání
  1. 1
    2
      api/extensions/ext_logging.py

+ 1
- 2
api/extensions/ext_logging.py Zobrazit soubor

@@ -27,12 +27,11 @@ def init_app(app: DifyApp):
# Always add StreamHandler to log to console
sh = logging.StreamHandler(sys.stdout)
sh.addFilter(RequestIdFilter())
log_formatter = logging.Formatter(fmt=dify_config.LOG_FORMAT)
sh.setFormatter(log_formatter)
log_handlers.append(sh)

logging.basicConfig(
level=dify_config.LOG_LEVEL,
format=dify_config.LOG_FORMAT,
datefmt=dify_config.LOG_DATEFORMAT,
handlers=log_handlers,
force=True,

Načítá se…
Zrušit
Uložit