syslogGenerate a system log message
&reftitle.description;
boolsyslogintprioritystringmessagesyslog generates a log message that will be
distributed by the system logger.
For information on setting up a user defined log handler, see the
syslog.conf5 Unix manual page. More
information on the syslog facilities and option can be found in the man
pages for syslog3 on Unix machines.
&reftitle.parameters;
prioritypriority is a combination of the facility and
the level. Possible values are:
syslog Priorities (in descending order)ConstantDescriptionLOG_EMERGsystem is unusableLOG_ALERTaction must be taken immediatelyLOG_CRITcritical conditionsLOG_ERRerror conditionsLOG_WARNINGwarning conditionsLOG_NOTICEnormal, but significant, conditionLOG_INFOinformational messageLOG_DEBUGdebug-level message
message
The message to send.
&reftitle.returnvalues;
&return.success;
&reftitle.examples;
Using syslog
]]>
&reftitle.notes;
On Windows, the syslog service is emulated using the Event
Log.
Use of LOG_LOCAL0 through
LOG_LOCAL7 for the facility
parameter of openlog is not available
in Windows.
&reftitle.seealso;
openlogcloselogsyslog.filter INI setting (starting with PHP 7.3)