Coder Social home page Coder Social logo

Comments (7)

Seldaek avatar Seldaek commented on July 18, 2024

Sorry but I have never used syslog much so I'm not exactly familiar with that stuff. Would you mind giving an example of how that would look like in plain php?

from monolog.

auro1 avatar auro1 commented on July 18, 2024

I don't have an example of my own, but look at this

http://www.phpclasses.org/package/2787-PHP-Log-data-to-a-RFC-3164-compliant-syslog-server.html
http://www.phpclasses.org/browse/file/12157.html

from monolog.

stof avatar stof commented on July 18, 2024

What you linked is an implementation in user-land to contact a remote server. It does not uses the PHP built-in syslog functions (which are probably limited to accessing the syslog configured locally).
The SyslogHandler is based on the PHP built-in functions so you will need to write your own handler for this.

from monolog.

Seldaek avatar Seldaek commented on July 18, 2024

Well I suppose the SyslogHandler could take an optional $host argument where it sends everything. Looking at that code that was linked, the actual sending is a couple lines of code. If you can provide a pull request for it it would definitely improve the chances it gets done though, I'm currently really swamped.

from monolog.

auro1 avatar auro1 commented on July 18, 2024

I'll have a go at it. :)

from monolog.

Seldaek avatar Seldaek commented on July 18, 2024

The SocketHandler for syslog-ng (which I guess is close enough to this feature request) has been merged, so I am closing this. See #63 and https://github.com/Seldaek/monolog/blob/master/doc/sockets.md

from monolog.

jankonas avatar jankonas commented on July 18, 2024

There is a SyslogUdpHandler: https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/SyslogUdpHandler.php.

Just leaving it here, because I found this issue and took me another 30 minutes to find the handler :-)

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.