-
Notifications
You must be signed in to change notification settings - Fork 483
Castle.Services.Logging.EventLogIntegration for Windows EventLog #694
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
Conversation
90fc013 to
e2d3359
Compare
e4f9c96 to
bf66485
Compare
a05e9c2 to
a891322
Compare
|
@snakefoot, it's been a while. I've finally found a moment to look at this. Sorry for letting you wait so long. Code conflicts resulting from the merge of #696 aside, I think we should first come to a decision on the future of Castle's logging facilities in general (see #408) before we proceed here. As long as we haven't decided for or against deprecating the logging facilities as a whole, I'd prefer not to invest too much time in them... including this PR. I do agree that it's a bit strange to have almost all bits of a library work on all platforms except this one class, Given these considerations, perhaps it would be much less trouble simply changing |
674a756 to
f61e440
Compare
|
Still think Castle.Core should have minimal dependencies, and not drag unnecessary dependencies for all users. Also considering that the Castle.Core-Logging-API is not that relevant after the introduction of Microsoft.Extensions.Logging. The |
|
@snakefoot, you're making a good argument regarding minimal dependencies, I definitely agree with you there. (If it were solely up to me, I'd go much further and reduce Castle.Core to just DynamicProxy. But this project traditionally tries very hard not to cause unnecessary breaking changes for downstream users, which I think is a good policy for any infrastructure library. So I'm practicing some restraint there. 🙃) Maybe introducing an additional logging package really wouldn't be a big deal, even if it ends up being a short-lived intermediate step towards abandoning the logging facilities. (Especially when considering that coming to a conclusion in #408 may be indefinitely held up by the Castle Windsor project, which hasn't seen any active development in a while.) Let me sleep on this. |
stakx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's entirely possible that the logging facilities will soon disappear completely, but in case that we keep them around, I now agree with you that the Castle.Core package should be freed from the package dependency on System.Diagnostics.EventLog.
Could you please rebase your PR on top of current master and look into the few things I've commented on? You may additionally have to update the ref/ files, too.
src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj
Outdated
Show resolved
Hide resolved
src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs
Show resolved
Hide resolved
...stle.Services.Logging.EventLogIntegration/Castle.Services.Logging.EventLogIntegration.csproj
Outdated
Show resolved
Hide resolved
...stle.Services.Logging.EventLogIntegration/Castle.Services.Logging.EventLogIntegration.csproj
Outdated
Show resolved
Hide resolved
src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLogger.cs
Outdated
Show resolved
Hide resolved
src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLogger.cs
Outdated
Show resolved
Hide resolved
src/Castle.Services.Logging.NLogIntegration/Castle.Services.Logging.NLogIntegration.csproj
Outdated
Show resolved
Hide resolved
|
@stakx Review comments should now be resolved. |
stakx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snakefoot, thanks for the changes. We're almost there! There's just a small handful of file issues remaining, if you could clean those up that'd be great.
Btw. do you want to add an entry in CHANGELOG.md? Something like this:
Breaking Changes:
* Moved `Castle.Core.Logging.DiagnosticsLogger` into a separate NuGet package `Castle.Core-DiagnosticsLogger` (@snakefoot, #694)
ref/Castle.Services.Logging.EventLogIntegration-netstandard2.1.cs
Outdated
Show resolved
Hide resolved
stakx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the requested changes, this is looking good to go now!
(I'll add a changelog entry for this after the merge, there's some things I need to amend there anyways.)
|
Thanks for contributing! 🚀 |
Removed nuget-dependency
System.Diagnostics.EventLogfrom the Castle.Core-package as it is Windows-only (And will explode in your face when used on other platforms).Makes Castle.Core free of extra nuget-dependencies for
net462+netstandard2.1+net8.0(essence of core)People using Windows and depend on the
DiagnosticsLoggerjust have to add an additional nuget-package to their project.Could consider changing
net8.0tonet8.0-windowsforCastle.Services.Logging.EventlogIntegrationand remove the direct nuget-dependency.