Missing the date field in log file content #7724

Closed
opened 2026-02-21 18:22:03 -05:00 by yindo · 1 comment
Owner

Originally created by @acelyc111 on GitHub (Jan 14, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.1

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. start the api server
  2. check the content of logs in files

✔️ Expected Behavior

Every log line has a date field

Actual Behavior

The date field is missing

INFO:root:Loaded ext_storage (364.46 ms)
INFO:root:Loaded ext_celery (1.46 ms)
INFO:root:Loaded ext_login (0.01 ms)
INFO:root:Skipped ext_mail
INFO:root:Loaded ext_hosting_provider (0.0 ms)
INFO:root:Loaded ext_sentry (0.0 ms)
INFO:root:Loaded ext_proxy_fix (0.0 ms)
INFO:root:Loaded ext_blueprints (373.1 ms)
INFO:root:Loaded ext_commands (1.6 ms)
INFO:root:Finished create_app (11808.69 ms)
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5001
 * Running on http://x.x.x.x:5001
INFO:werkzeug:Press CTRL+C to quit
Originally created by @acelyc111 on GitHub (Jan 14, 2025). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.1 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1. start the api server 2. check the content of logs in files ### ✔️ Expected Behavior Every log line has a date field ### ❌ Actual Behavior The date field is missing ``` INFO:root:Loaded ext_storage (364.46 ms) INFO:root:Loaded ext_celery (1.46 ms) INFO:root:Loaded ext_login (0.01 ms) INFO:root:Skipped ext_mail INFO:root:Loaded ext_hosting_provider (0.0 ms) INFO:root:Loaded ext_sentry (0.0 ms) INFO:root:Loaded ext_proxy_fix (0.0 ms) INFO:root:Loaded ext_blueprints (373.1 ms) INFO:root:Loaded ext_commands (1.6 ms) INFO:root:Finished create_app (11808.69 ms) INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:5001 * Running on http://x.x.x.x:5001 INFO:werkzeug:Press CTRL+C to quit ```
yindo added the 🐞 bug label 2026-02-21 18:22:03 -05:00
yindo closed this issue 2026-02-21 18:22:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 14, 2025):

The issue of missing date fields in the log file content might be due to the logging formatter configuration. In the Dify codebase, the logging formatter named generic excludes the date field, using the format %(levelname)-5.5s [%(name)s] %(message)s [1].

To include the date field in your logs, you can adjust the LOG_DATEFORMAT setting. The default format is %Y-%m-%d %H:%M:%S, which includes the date and time [2]. Ensure that this setting is correctly configured in your environment variables or configuration files.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 14, 2025): <!-- Answer --> The issue of missing date fields in the log file content might be due to the logging formatter configuration. In the Dify codebase, the logging formatter named `generic` excludes the date field, using the format `%(levelname)-5.5s [%(name)s] %(message)s` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/migrations/alembic.ini)</sup>. To include the date field in your logs, you can adjust the `LOG_DATEFORMAT` setting. The default format is `%Y-%m-%d %H:%M:%S`, which includes the date and time <sup>[[2]](https://github.com/langgenius/dify/blob/main/docker/.env.example)</sup>. Ensure that this setting is correctly configured in your environment variables or configuration files. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/665b2261-40dc-45cf-8916-6681d6d8e4a5?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/665b2261-40dc-45cf-8916-6681d6d8e4a5?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/665b2261-40dc-45cf-8916-6681d6d8e4a5?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/665b2261-40dc-45cf-8916-6681d6d8e4a5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/665b2261-40dc-45cf-8916-6681d6d8e4a5?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/665b2261-40dc-45cf-8916-6681d6d8e4a5?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7724