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

Setting LOG_FORMAT: json does not write stack traces to logs #4039

Closed
matthewelwell opened this issue May 29, 2024 · 0 comments · Fixed by #4040
Closed

Setting LOG_FORMAT: json does not write stack traces to logs #4039

matthewelwell opened this issue May 29, 2024 · 0 comments · Fixed by #4040
Labels
api Issue related to the REST API bug Something isn't working good first issue Good for newcomers

Comments

@matthewelwell
Copy link
Contributor

To reproduce:

  1. Spin up a local instance of Flagsmith and set the environment variable LOG_FORMAT: json
  2. Trigger an internal server error (e.g. try to send an invite email without having SMTP configured)

Expected behaviour:

A stack trace is printed to the logs

Actual behaviour:

No stack trace is printed, only the JSON formatted log message as per the below.

{"levelname": "ERROR", "message": "Internal Server Error: /api/v1/organisations/2/invite/", "timestamp": "2024-05-29 08:54:17", "logger_name": "django.request", "process_id": 34, "thread_name": "ThreadPoolExecutor-1_0"}
@matthewelwell matthewelwell added bug Something isn't working good first issue Good for newcomers api Issue related to the REST API labels May 29, 2024
@matthewelwell matthewelwell changed the title Setting LOG_FORMAT=json does not write stack traces to logs Setting LOG_FORMAT: json does not write stack traces to logs May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant