cf-python-logging-support icon indicating copy to clipboard operation
cf-python-logging-support copied to clipboard

Add stacktrace to msg depending on an environment variable

Open j-denner opened this issue 11 months ago • 3 comments

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.

j-denner avatar Mar 21 '24 12:03 j-denner

@mhaas, @SebastianWolf-SAP: Hello, can you please review this PR or tell me whom to contact for a review.

j-denner avatar Apr 03 '24 11:04 j-denner

Pinging @Viktor-Velkov and @kmaslenkovsap as official maintainers for this project. Can you please check?

SebastianWolf-SAP avatar Apr 03 '24 12:04 SebastianWolf-SAP

Hello @Viktor-Velkov and @kmaslenkovsap,

can you please have a look?

Many thanks, Jürgen

j-denner avatar May 04 '24 05:05 j-denner

Hello @ivanovac and @tnikolova82,

can you please have a look?

Many thanks, Jürgen

j-denner avatar Jun 03 '24 15:06 j-denner

Hi @j-denner,

We'll have a look at the PR. If everything is fine we are planning release next week.

Best Regards, Teodora

tnikolova82 avatar Jun 04 '24 06:06 tnikolova82

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

ivanovac avatar Jun 19 '24 15:06 ivanovac

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

ivanovac avatar Jun 28 '24 09:06 ivanovac

The provided version 4.2.7 of cf-python-logging-support library contains the required fix.

ivanovac avatar Jul 08 '24 13:07 ivanovac