box / box-windows-sdk-v2

Windows SDK for v2 of the Box API. The SDK is built upon .NET Framework 4.5
https://developer.box.com
Apache License 2.0
186 stars 163 forks source link

Replace Debug.WriteLine #402

Open ohadschn opened 6 years ago

ohadschn commented 6 years ago

Debug.WriteLine is only there in debug session, but the information it prints could be useful in other scenarios, such as production debugging. Some alternatives, in increasing order of preference:

  1. Trace.TraceInformation / Trace.TraceWarning / Trace.TraceError.
  2. Same as above but using your own TraceSource
  3. EventSource (ETW).
mattwiller commented 6 years ago

It looks like the System.Diagnostics.Trace class is only supported in .NET Standard 2.0, which would be a breaking change for us to target today. We may need to explore alternate solutions, or just wait until we can drop support for older .NET Core versions.