Changing log level on api errors
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: https://github.com/splitio/python-client/blob/832613875cf1d5de0cfd6119ab358badc45d9cac/splitio/api/segments.py#L69
What is the reason for this? And is it possible to turn this into one error message with the stack trace included?
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.
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?