0

How can I write SYSLOG messages to different remote hosts in PHP (v5.3.3)

I need to be able to specify the remote host at the time of the call, ideally with a parameter to syslog (or other message).

I don't see a host parameter in the syslog function. https://www.php.net/manual/en/function.syslog.php

I'm able to do this in some Java code, but for various reasons I need to convert to PHP.

Geoff Maddock
  • 1,700
  • 3
  • 26
  • 47

1 Answers1

0

Just set error_log = syslog in your php.ini file and configure your local syslog daemon to send the requests somewhere else.

Alex Barker
  • 4,316
  • 4
  • 28
  • 47