Giter Site home page Giter Site logo

Configurable logger middleware about chi HOT 4 CLOSED

go-chi avatar go-chi commented on May 5, 2024
Configurable logger middleware

from chi.

Comments (4)

pkieltyka avatar pkieltyka commented on May 5, 2024

hey @mvdan thanks man, we've worked hard to keep middleware lean and robust.

I agree the middleware logger doesn't fit all needs, especially lacking structured logging. The nice thing about chi is that its fully compatible with the stdlib, and any other handler or middleware in the ecosystem that as well uses just the stdlib, that is http.Handler or func(http.Handler) http.Handler and r.Context() from *http.Request. Therefore you could write a logger in any repo, and it would 'just work' in chi, as well work perfectly well for any other Go project that uses vanilla http.Handler's :)

So far, we have used https://github.com/goware as our "contrib" for chi, since its really not chi specific, nothing is chi specific, its Go net/http specific

from chi.

mvdan avatar mvdan commented on May 5, 2024

Oh, makes sense. In that case, I think the README should be modified to clarify that any net/http middleware will work with chi. Right now it only mentions chi middleware and lists middlewares developed alongside chi, so this wasn't obvious to me.

Thanks!

from chi.

pkieltyka avatar pkieltyka commented on May 5, 2024

Ok cool, thanks for the feedback, I'll make sure to clarify in the README

from chi.

pkieltyka avatar pkieltyka commented on May 5, 2024

@mvdan 2fb5424 -- please let me know if thats better and if there are other parts in the docs that could be better or parts you feel are missing or under-represented. thanks!

from chi.

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.