Giter Site home page Giter Site logo

Comments (10)

sagikazarmark avatar sagikazarmark commented on May 27, 2024 1

Will this be solved by #84?

from httplugbundle.

sagikazarmark avatar sagikazarmark commented on May 27, 2024

This is something that would only make sense here, so the plugin itself could be in this repository, isn't it?

from httplugbundle.

Nyholm avatar Nyholm commented on May 27, 2024

I do not think we need a new plugin class. We just need a new HistoryPlugin service and add that last in the chain.

We could maybe do something cool when displaying this.. Like a git diff to show what was changed by the plugin chain.

from httplugbundle.

sagikazarmark avatar sagikazarmark commented on May 27, 2024

Diff sounds cool, but unsure about the usefulness in this case...but I am not against it.

Also, see php-http/httplug#105 for diff stuff

from httplugbundle.

Nyholm avatar Nyholm commented on May 27, 2024

I suggest we add two collectors per client. One at the beginning of the plugin queue and one at the end. We want to do it per client because we want to show that client X sent this request and client Y sent that request.

from httplugbundle.

sagikazarmark avatar sagikazarmark commented on May 27, 2024

Why would we need two collectors.

We want to add something to the beginning and to the end of a queue where the order matters. It sounds familiat, doesn't it? (Plugin chain)

Maybe we can somehow pass the client to the journal as well to identify the sender?

from httplugbundle.

joelwurtz avatar joelwurtz commented on May 27, 2024

Or it could be a PluginClientDebug whichs extends the PluginClient one to replace the plugin chain and log the total stack trace of a request (go in this plugin, then in this one, then in this client, ...)

from httplugbundle.

Nyholm avatar Nyholm commented on May 27, 2024

I can't see how we could pass an identifier to the journal/history plugin to be used every second time. That's why I suggested two collectors.

I like @joelwurtz idea with a PluginClientDebug. That would make a lot of things easier to extract. Like which plugins are used with which clients. It could also be easier to inject the data collector and also a stopwatch(?).

from httplugbundle.

sagikazarmark avatar sagikazarmark commented on May 27, 2024

I also like the idea. But keep in mind that this debug client must not have any more features than debug. I mean, the behavior should be transparent: logging should also be done in prod mode in the "ordinary" plugin client with the configured logger. (BTW: is it possible right now to configure multiple logger plugins with different loggers (channels)?)

from httplugbundle.

joelwurtz avatar joelwurtz commented on May 27, 2024

I think we can integrate the debug in the existing PluginClient by adding a debug options which takes a Plugin as the input (or a list of plugins) and these plugins are injected between each existent plugin

from httplugbundle.

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.