Giter Club home page Giter Club logo

Comments (6)

kasmarian avatar kasmarian commented on June 12, 2024 1

I think it can be helpful to make the right filtering decision if it had more context. As you mentioned, at least to know if it's a request/response and what's the origin.

As per the example you mentioned, I understand it's just an example, but just to point out that this is already possible. You could use the ResponseFilter for cases when you want to omit logging the response body based on some conditions. That's what ResponseFilters.defaultValue() is using via BodyReplacers to avoid logging bodies with binary data.

from logbook.

nhmarujo avatar nhmarujo commented on June 12, 2024

Thank you for the prompt answer @kasmarian . Honestly I was not aware of that, but yes it was just an example. That said I still see value in having more context in filters so that people have more flexibility to make decisions 🙂

Would this be something that your team would consider adding?

Thank you

from logbook.

kasmarian avatar kasmarian commented on June 12, 2024

We could have a look, yes, but I can't tell you any timeline promises. If you have time and desire, please feel free to suggest the changes, and we'll review them.

from logbook.

nhmarujo avatar nhmarujo commented on June 12, 2024

Thanks @kasmarian . Honestly I had no expectations time-wise. More than a matter of time and desire, I'm lacking deeper knowledge on how things are structured. But I will take a look and who knows, if I get some idea I will shared of course 😉 Have a nice weekend!

from logbook.

nhmarujo avatar nhmarujo commented on June 12, 2024

Was also thinking that it also be good to be aware of the status code, if you are dealing with a response.

from logbook.

whiskeysierra avatar whiskeysierra commented on June 12, 2024

A BodyFilter was meant to be just that, a filter for a message body. If you need more context or want to only apply something for requests but not responses, etc. then I'd argue you should use one of the lower-level abstractions like Request- or ResponseFilter.

from logbook.

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.