Skip to content

Commit 23c68ef

Browse files
authored
fix: fix the formatter is not applied on log file (#12704)
1 parent 560c5de commit 23c68ef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: api/extensions/ext_logging.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ def init_app(app: DifyApp):
2727
# Always add StreamHandler to log to console
2828
sh = logging.StreamHandler(sys.stdout)
2929
sh.addFilter(RequestIdFilter())
30-
log_formatter = logging.Formatter(fmt=dify_config.LOG_FORMAT)
31-
sh.setFormatter(log_formatter)
3230
log_handlers.append(sh)
3331

3432
logging.basicConfig(
3533
level=dify_config.LOG_LEVEL,
34+
format=dify_config.LOG_FORMAT,
3635
datefmt=dify_config.LOG_DATEFORMAT,
3736
handlers=log_handlers,
3837
force=True,

0 commit comments

Comments
 (0)