GeezerVison is showing github.com — Changing log level on api errors · Issue #514 · splitio/python-client
Changing log level on api errors #514
Description
Currently when there is an api error the logger logs and error, but the stack trace is included only in a following debug log.
This is true to all api clients, including segments, splits, events, impressions, telemetry
for example:
What is the reason for this?
And is it possible to turn this into one error message with the stack trace included?
Activity
kleinjoshuaa commented on Mar 28, 2024
Hi @gtal-box - the reason for this is that Error and Debug are two different log levels. At the error level you will just get the error. The debug log level you will get both the error and the stack trace.
gtal-box commented on Apr 2, 2024
Hi @kleinjoshuaa,
From my humble experience it is a common practice to have the stack trace as part of the error log message.
- I see you are already doing it in other client libraries like dotnet and java.
- It is easier to investigate prod problems without turning debug logs on.
Can you please consider adding the stack trace to the error message?
chillaq commented on Nov 12, 2025
Hi @gtal-box, thanks for raising this question, we actually had the stack trace also logged as error and we got complaints that it is cluttering the log output, especially when there is an exception that is reported frequently, given that error logging is the standard logging on production.
This is why we moved the stack trace to a debug level instead.
Let us know if you have any questions.
Thanks
Bilal
Metadata
Metadata
Development
No branches or pull requestsIssue actions