Coder Social home page Coder Social logo

Comments (1)

rantonmattei avatar rantonmattei commented on July 20, 2024

Yes, you are absolutely right. There are still a few things missing. What you are mentioning is part of it.

I referenced that in a blog post I wrote. https://medium.com/orchard-technology/enhancing-monolog-699efff1051d (See Limitations section). I should probably add that to the ReadMe as well cause it impacts a bunch of handlers.

I haven't given it too much thoughts yet but feel free to take a stab at it and submit a PR.

The main challenge here is to be able to translate a statement like

new Raven_Client($someArg, $anotherArg, ...);

into something much simpler like a Yaml syntax and to have it flexible enough so it does support instantiating any classes passing a bunch of args.

Something along

handlers:
    raven_handler:
        class: Monolog\Handler\RavenHandler
        raven_client:
            class: Raven_Client
            options_or_dsn: "xxx"
        level: WARNING

would be ideal and would allow to reuse the class loader. It would require adding more recursion to the parsing. (=> This is just a quick thought.)

For now the only workaround I see is to use a Php array as your config. I haven't tried though, but it might work.

I'll leave this issue open in case someone wants to take a stab at it.

from monolog-cascade.

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.