Git Product home page Git Product logo

Comments (3)

tanuck avatar tanuck commented on June 10, 2024

@leggetter how far do you want to go with this? Would you just want to implement a Pusher::setLogger(PSR3CompliantLogger $logger) method? Or do you also want to include a PSR3 logger as part of the pusher library?

I would go with the former and maybe add a dependency for a PSR3 logger and use that as the default? Or only log any data if a logger has been set by the user.

from pusher-http-php.

leggetter avatar leggetter commented on June 10, 2024

I'd suggest we ditch the setLogger for this library and instead make it:

$pusher = new Pusher($appId, $appKey, $appSecret, array('logger' => $PSR3CompliantLogger));

or something similar depending on what's decided for #66.

By default there's maybe some kind of null logger implementation and a developer can pass in their own implementation to the constructor.

How's that sound?

from pusher-http-php.

zimbatm avatar zimbatm commented on June 10, 2024

All the interactions of the library either give a result or throw an exception. If the user wants to do logging I propose that he wraps the library himself of add his own adapter that basically wraps all the calls with some logging.

Closing for now.

from pusher-http-php.

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.