-
Notifications
You must be signed in to change notification settings - Fork 205
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
Common.Logging.NLog45 with support for structured logging #176
base: master
Are you sure you want to change the base?
Conversation
@sbohlen Added the project to |
nice @snakefoot ! |
@sbohlen Tried upgrading to VS2017-Solution together with new VS2017-csproj-format (Support NetCore) |
Please please please, will this make display
instead of
?! |
Yes it will. But because you have done ClientId.ToString then NLog will put quotes around "100"
|
Great! Only did the ToString() because I thought I was preventing boxing, but yeah.. I see the quotes now. Cheers |
I can attach a nuget package for the build. That you can upload to your own nuget-server or put in local-package-folder
Not sure when this PR will be consumed and published by the official project. Not the owner of this project.
|
Please, that will help me sort this before my stackify retrace trial ends 🥇 . Ps, I never saw attachments in GitHub, so, where will this attachment appear? |
@Mies75 Not able to work on spare-time-projects 24/7. But I have now updated original post with an attachment to a custom build of |
…NDLC (Code Layout)
Awesome effort, trying it now! |
Must have replied on Stack Overflow instead of GitHub, sorry for that. |
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.
@sbohlen please merge and release this, thanks!
Updated the PR to include better support for callsite-handling. Thanks to @Defee |
I am running some perfview tests on our servers, to clear up the exception stack. Now I run into this: Is this related to this PR? |
Are you running the latest build that I have just updated the initial post (ver 3.4.2) ?
|
It's our PRD system, running your initial custom build. Update: Update 2: |
What version of NLog? Remember never to use throwExceptions=true in production.
The InfoFormat call looks valid. So not sure if you have found the one that actually failed.
|
…NDLC (Extract exception from message object)
NLog 4.5.11 for the affected system. I am 100% sure that is the line that was failing, and I cannot fathom why. We never user throwExceptions in the nlog.config. When we are experiencing problems we use internal logging. |
That version of NLog should work just fine. If you are able to reproduce the case then please let me know.
|
Any time frame when this will be merged? |
Very important and useful changes, is there any news? |
And MDLC / NDLC
Attached custom build of nuget-package
Common.Logging.NLog45
(Just remove.zip
file extension):Updated build -> Common.Logging.NLog45.3.4.2.nupkg.zip
It is not built with strong-name. This requires an official build with the "secret" snk-file. But for NetCore / NetStandard then strong-name not required.
You can use it like this in
app.config
:Or use it like this in NetCore
appsettings.json
together with binding-logic (AndNLog.config
):Or just do it from code alone without any config-file:
Previous Build without proper callsite support -> Common.Logging.NLog45.3.4.1.nupkg.zip