[GH-ISSUE #51] Syslog Handler - External syslog server #11

Closed
opened 2026-03-04 02:11:20 +03:00 by kerem · 7 comments
Owner

Originally created by @auro1 on GitHub (Jan 12, 2012).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/51

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

Originally created by @auro1 on GitHub (Jan 12, 2012). Original GitHub issue: https://github.com/Seldaek/monolog/issues/51 It is not possible to use an external syslog server, it can only log to the local syslog server.
kerem closed this issue 2026-03-04 02:11:20 +03:00
Author
Owner

@Seldaek commented on GitHub (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?

<!-- gh-comment-id:3529531 --> @Seldaek commented on GitHub (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?
Author
Owner

@auro1 commented on GitHub (Jan 17, 2012):

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

<!-- gh-comment-id:3531818 --> @auro1 commented on GitHub (Jan 17, 2012): 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
Author
Owner

@stof commented on GitHub (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.

<!-- gh-comment-id:3532606 --> @stof commented on GitHub (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.
Author
Owner

@Seldaek commented on GitHub (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.

<!-- gh-comment-id:3535100 --> @Seldaek commented on GitHub (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.
Author
Owner

@auro1 commented on GitHub (Jan 18, 2012):

I'll have a go at it. :)

<!-- gh-comment-id:3542361 --> @auro1 commented on GitHub (Jan 18, 2012): I'll have a go at it. :)
Author
Owner

@Seldaek commented on GitHub (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

<!-- gh-comment-id:5268830 --> @Seldaek commented on GitHub (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
Author
Owner

@jankonas commented on GitHub (Oct 27, 2020):

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

<!-- gh-comment-id:717599299 --> @jankonas commented on GitHub (Oct 27, 2020): 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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#11
No description provided.