IdentityPython / djangosaml2

Django SAML2 Service Provider based on pySAML2
Apache License 2.0
254 stars 143 forks source link

Add traceback info to logger messages within exceptions #394

Closed mjsir911 closed 5 months ago

mjsir911 commented 6 months ago

Hi,

We were running into an old issue #294 that got resolved back in 1.3.1 #297, but it took us a bit to track down because we were getting them through email and weren't seeing any traceback info.

This PR enables traceback info to any logging calls that are might include traceback info / are inside exceptions.

Additionally it might be possible to remove the f"{e}" from these logging calls since it's now included in the traceback / exception info that shows up in the logs, but I haven't done that since y'all do that elsewhere too.

peppelinux commented 6 months ago

Hey @mjsir911 I have read and I can say that I approve this contribution to djangosaml2 that improve the debug information when some error might be critical for a production system

I look forward for the resolution of the issues we have in the unit tests, you can see how the CI fails. When these issues will be fixed I'll ask you to increase the version of djangosaml2, then we'll be able to merge and tag a new release

mjsir911 commented 5 months ago

@peppelinux fixed the tests

peppelinux commented 5 months ago

ok, let's then do this release

can you please set 1.9.1 here? https://github.com/IdentityPython/djangosaml2/blob/master/setup.py#L30

mjsir911 commented 5 months ago

done @peppelinux