dahlsailrunner / flogger

F(ull) logger for .NET built for Serilog
MIT License
7 stars 2 forks source link

Any interest in migrating this to .net 5? #1

Open justSteve opened 3 years ago

justSteve commented 3 years ago

Greetings Mr. Dahl - I've taken both your Pluralsight logging course and am impressed with the level of your samples. I'm curious about things learned as you worked thru 'Simple's' migration - if you'd approach things differently given a 2nd time thru.

I think EF5's updated logging & interception extensions would find a place in your toolset?

Perhaps I could interest you by a $ponsoring an effort that applies the more sophisticated aspects of Flogger to .net 5?

dahlsailrunner commented 3 years ago

HI @justSteve - I'm glad you found the content interesting and hopefully useful. Going through anything a second (or more generally, subsequent), I generally find opportunities for improvement and refinement. That doesn't make me disappointed with the original content since it reflected my best thinking at the time, but there's so much to learn (always) that new techniques become possible.

As for what I'd do differently from the original, the details escape me a little but I can look soon. The primary goals of the logging frameworks never change:

One very specific thing that I've come across more recently is the "request logging" capability within Serilog for ASP.NET Core and .NET 5. This creates a log entry at the end of http requests and includes the response code and timing. If you can then add things like user information, assembly information, and other "standard" details to that single entry for an http request, your OTHER log entries don't need to include as much information as long as there is a requestid/correlationid that can tie you to that larger entry. This technique can save you on log space on disk.

I'll see if I can create a new repo that at least starts down this path over the next weekend or two.

As for the EF5 stuff, I don't use it that much but I'm guessing it would be easy to include some things - so I'll review that as I create the new repo. It might not be fully-featured as you might hope - but I'm thinking it might serve to get you far enough where you could expand it in ways that would dial it in properly for you.

Will keep you posted on the new repo.

justSteve commented 3 years ago

Thanks @dahlsailrunner Delighted by the response! In the time since opening this I've stepped thru your recent posts on LinkedIn and am really excited by the progress you've outlined re IS4 and your PS samples. The thought occurs that using the current 'AspNetCore-Effective-Logging' as a starting point, adding EF5 and IS4 coupled with what should be a fairly painless migration from 3.1 to .net5 would be a fine jumping off point.

And then, of course, adding the Flogger project as something that becomes the reusable component you've envisioned in the 'opinionated' tutorial.

I'm by no means an EF expert but I think I could contribute something by adding at least something of the EF layer to the BookClub projects. I've forked that repo and could sent up a PR under a new branch on that repo over the next couple of days. Ideally in time for some weekend perusal on your part.

Thanks again -- looking forward to seeing what comes of this.