-
Notifications
You must be signed in to change notification settings - Fork 141
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
Deprecate Serilog Configuration #221
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR. I have moved to a different team and SDK ownership will be transferred. CLosing off the pending PRs. Can you confirm if your PR is complete and handling serilog deprecation? I can review it then and get this prioritized |
Please make any readme updates for changes in behavior expected with this PR |
If you're interested in the change, I can bring the PR up to date and tackle this:
|
814af50
to
fc1c4d2
Compare
Code is ready for review. I've tried really hard to avoid breaking changes, other than compiler warnings when using the Working on a README update.
Opened a new issue for this: #286 |
Using separate interface to avoid breaking IOAuthAdvancedLogger.
c2b1481
to
776a569
Compare
OK, updated README and marked the old file-based |
Opened #289 for this, with some observations about the final state. Since my PR is from a fork I can't open that PR into this PR, so it shows all the changes. Here's just what's new in that PR: dahlbyk/QuickBooks-V3-DotNET-SDK@deprecate-serilog...remove-serilog. |
Following on from #108 (comment), and seeing many Serilog-related issues, I tracked down how Serilog is currently used:
QuickBooks-V3-DotNET-SDK/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Diagnostics/AdvancedLogging.cs
Lines 267 to 270 in 69d0962
That's it. Everything else is providing a proprietary way to configure Serilog, which does not seem like it should be this library's responsibility. For my part, I plan to stay on version 8.1.0 until the Serilog dependency is removed.
To that end, I offer this PR as a start towards Part 1 of 3:
Part 1: Deprecate Serilog Configuration
AdvancedLogger.Logger
to allow configuring anIAdvancedLogger
without SerilogTraceLogger
serve as anIAdvancedLogger
Configuration.RequestAdvancedLog
and Serilog-specificDiagnostics.AdvancedLogging
as[Obsolete]
, nudging users towardsTraceLogger
or integrating with their existing logging infrastructureA Serilog user who is using
RequestAdvancedLog.CustomLogger
would do something like this instead:A similar approach would be taken with
IOAuthAdvancedLogger
, though the required changes are more extensive due to howOAuth2Client.AdvancedLogger
is initialized.Part 2: Remove Serilog
Remove the Serilog dependencies and everything made
[Obsolete]
in Part 1.You could certainly move the existing code to an
Intuit.Ipp.Diagnostics.Serilog
project/package to make this less of a breaking change, but I wouldn't think it's worth the effort to maintain.Part 3: Adopt Microsoft.Extensions.*
Microsoft.Extensions.Logging
could be an alternative implementation of yourILogger
, or perhaps replace it altogether - logging is easier to consume with careful categorization (eliminating the need for "Advanced Logging"), which is not possible with the existing interfaceJsonFileConfigurationProvider
usesMicrosoft.Extensions.Configuration
, but doesn't take advantage of its strongly-typed patternsIConfigurationRoot
gets built; many apps will have alternative configuration sourcesServiceProvider
could have access to everything you need to access current configuration, resolve anILoggerProvider
, etcAll things being equal, I would probably target version 2.1.x due to support on .NET Framework.