Coder Social home page Coder Social logo

Non-Blocking options about monolog HOT 5 CLOSED

seldaek avatar seldaek commented on July 18, 2024
Non-Blocking options

from monolog.

Comments (5)

stof avatar stof commented on July 18, 2024

What do you mean by non-blocking ? Logging asynchronously ? this would be hard given the fact that PHP is synchronous (playing with forks of the process is not a good idea IMO given that it would probably introduce more bugs in the logging process than helping about making it efficient)

from monolog.

katanacrimson avatar katanacrimson commented on July 18, 2024

You're probably looking for the syslog handler.

from monolog.

Seldaek avatar Seldaek commented on July 18, 2024

There are no real async handlers, but the GelfHandler is the closest to async since it uses UDP to send data to the server, it's just pushing data as fast as it can and never waits for ACKs.

from monolog.

dragoonis avatar dragoonis commented on July 18, 2024

Hey guys, thanks for the replies.

By my initial statement, I was just looking for something that wouldn't connect to a remote server, try to log to a file, wait for the file append to complete, then send back a success code.

I've decided, for a number of reasons, to go with ZeroMQ, I'm going to quickly stick in a "log" job into its event pool and disconnect. So that the job itself of logging is decoupled from my PHP process and thus much faster.

from monolog.

benbor avatar benbor commented on July 18, 2024

Hello!
Now Non-Blocking option relevant for ReactPHP.

from monolog.

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.