mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #51] Syslog Handler - External syslog server #11
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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?
@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
@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.
@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.
@auro1 commented on GitHub (Jan 18, 2012):
I'll have a go at it. :)
@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
@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 :-)