Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syslog Handler - External syslog server #51

Closed
auro1 opened this issue Jan 12, 2012 · 7 comments
Closed

Syslog Handler - External syslog server #51

auro1 opened this issue Jan 12, 2012 · 7 comments

Comments

@auro1
Copy link

auro1 commented Jan 12, 2012

It is not possible to use an external syslog server, it can only log to the local syslog server.

@Seldaek
Copy link
Owner

Seldaek commented Jan 17, 2012

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?

@auro1
Copy link
Author

auro1 commented Jan 17, 2012

@stof
Copy link
Contributor

stof commented Jan 17, 2012

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.

@Seldaek
Copy link
Owner

Seldaek commented Jan 17, 2012

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.

@auro1
Copy link
Author

auro1 commented Jan 18, 2012

I'll have a go at it. :)

@Seldaek
Copy link
Owner

Seldaek commented Apr 22, 2012

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

@Seldaek Seldaek closed this as completed Apr 22, 2012
@jankonas
Copy link

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants