cf-python-logging-support
cf-python-logging-support copied to clipboard
Add stacktrace to msg depending on an environment variable
Currently, a stack trace is added twice to the log record. This bloats the data sent to the logging infrastructure. This changes adds the ability to disable this by an environment variable and keeping the old behavior for compatibility reasons.
@mhaas, @SebastianWolf-SAP: Hello, can you please review this PR or tell me whom to contact for a review.
Pinging @Viktor-Velkov and @kmaslenkovsap as official maintainers for this project. Can you please check?
Hello @Viktor-Velkov and @kmaslenkovsap,
can you please have a look?
Many thanks, Jürgen
Hello @ivanovac and @tnikolova82,
can you please have a look?
Many thanks, Jürgen
Hi @j-denner,
We'll have a look at the PR. If everything is fine we are planning release next week.
Best Regards, Teodora
Hi @j-denner , The PR proposed is quite custom modification that other consumer might not be aware of, and we prefer not to add such customizations. The described duplication occurs when an exception is thrown. We would think of different solution that would be useful for everyone. From the other side, you're proposing to remove the duplication by skipping fulfillment of the message ['msg'] entry of the record when it's already filled in the stacktrace entry - we are not sure if this is ok, as our contract includes all these entries like: thread, level, msg, stacktrace, etc. We'll think for change in this behaviour and will let you know what we have decided.
Best Regards, Tsvetelina Marinova
Hello Colleagues, The required changes are included to the newest release of the library. Please check cf-python-logging-support v4.2.7 : https://github.com/SAP/cf-python-logging-support/tree/v4.2.7 https://pypi.org/project/sap-cf-logging/4.2.7/
Best Regards, Tsvetelina Marinova
The provided version 4.2.7 of cf-python-logging-support library contains the required fix.