Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk logging is broken #63

Open
Ben-Holley opened this issue Nov 29, 2021 · 1 comment
Open

sdk logging is broken #63

Ben-Holley opened this issue Nov 29, 2021 · 1 comment

Comments

@Ben-Holley
Copy link

In v11.35.1, OneSpanSign.Sdk.Internal.ApplicationLogger no longer seems to work because the trace compiler constant is missing.
I suspect, but did not validate, this setting went missing during the upgrade to netstandard. The visual studio project type for netstandard doesn't have an obvious way to set this, and it seems to be set by default back in the full .net framework days.

According to Microsoft, there are 2 ways to fix the issue:

  1. Adding #define TRACE to OSS SDK code.
  2. specifying the option /d:TRACE when compiling OSS SDK code.

I didn't check the code on versions newer than v11.35.1, because those tags aren't available.

In case you're curious what's going on behind the scenes, here is what ApplicationLogger looks like when decompiled, and TRACE is not defined. Notice all the empty methods.
image

Here is what ApplicationLogger looks like when decompiled, and TRACE is defined. Notice methods arent empty.
image

Here is the quick and dirty fix I used so I could move forward.
image

@B-HOLLEY
Copy link

Any updates?

B-HOLLEY added a commit to B-HOLLEY/oss.sdk.net that referenced this issue Oct 17, 2024
 OneSpan#63: Resolving issue where logging is broken because of missing TRACE compiler flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants