Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Celery worker log format not following "LOG_FORMAT" env #9404

Closed
5 tasks done
wy96f opened this issue Oct 16, 2024 · 2 comments · Fixed by #10016
Closed
5 tasks done

Celery worker log format not following "LOG_FORMAT" env #9404

wy96f opened this issue Oct 16, 2024 · 2 comments · Fixed by #10016
Labels
🐞 bug Something isn't working

Comments

@wy96f
Copy link
Contributor

wy96f commented Oct 16, 2024

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.9.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. do some operations about knowledge-base, e.g., delete dataset
  2. observe logs of dify-worker which don't follow "LOG_FORMAT" env

✔️ Expected Behavior

微信截图_20241016154817

These are logs of dify-app following “LOG_FORMAT” env.

❌ Actual Behavior

image

Copy link

dosubot bot commented Oct 16, 2024

The issue you're encountering seems to be that the Celery worker logs are not adhering to the LOG_FORMAT environment variable, unlike the logs from the main Dify application. This discrepancy might be due to how the logging is configured for the Celery worker.

In the Dify codebase, the LOG_FORMAT environment variable is used to configure the logging format in the main application through the logging.basicConfig function [1]. However, for the Celery worker, the logging configuration is set up using the --loglevel option in the exec command, which primarily sets the log level based on the LOG_LEVEL environment variable [2]. The LOG_FORMAT might not be explicitly applied to the Celery worker's logging setup.

To resolve this, you may need to modify the Celery worker's logging configuration to explicitly use the LOG_FORMAT environment variable. This could involve adjusting the Celery worker's startup script or configuration to ensure that the logging format is set according to your requirements.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Oct 16, 2024
@wy96f
Copy link
Contributor Author

wy96f commented Oct 29, 2024

Also 'LOG_TZ' is not following either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant