Giter Club home page Giter Club logo

Comments (5)

Jericho avatar Jericho commented on September 20, 2024

Interesting idea. I definitely can see the benefit to those using Seq. I'll need a little while to think about how to implement this. I'll set a side some time this weekend to work on it.

If I publish beta nuget packages, would you have time to test and give me some feedback in the next few days/week?

from stronggrid.

Jericho avatar Jericho commented on September 20, 2024

Regarding your suggestion to use Flurl: this sounds like we would have to replace all our code when making http requests. I'm sure we could figure how to do that but it would definitely be a lot of work, which I don't have much desire to do.

< impersonates Marc Cuban on Shark Tank >For all these reasons... I"M OUT!
😉

from stronggrid.

Jericho avatar Jericho commented on September 20, 2024

I worked on this over the weekend and I have a proof of concept.

Firstly, I tried using (logger.BeginScope("{RequestHeaders}", request.Headers)) but what I observed is that the values in the dictionary passed to the BeginScope method are being lost in the three environments I use for testing purposes: console, Microsoft Application insights in Azure and Logz.io. I assume it's different in your environment and that Seq can pickup these value (I have never used Seq so I don't know for sure) but I'm not willing to compromise the information available when a developer is not using something similar to Seq.

My second attempt, however, was much more successful: I enhanced the message template and made sure that every single data point is a named parameter. This results in all the necessary info available in non-structured logging environments (like the console for example) as you can see below:

image

and all the named parameters being captured as "custom properties" in systems like Azure Application Insights:
image

and similarly in logz.io:
image

I have published StrongGrid 0.107.0-structured-loggi0014 to my personal nuget feed, let me know if you have a chance to beta test it.

from stronggrid.

Jericho avatar Jericho commented on September 20, 2024

@abagonhishead Just checking if you had a chance to try the beta package? Also, FYI I published an updated beta version to fix a few minor details.

from stronggrid.

Jericho avatar Jericho commented on September 20, 2024

🎉 This issue has been resolved in version 0.107.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

from stronggrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.