PHP function syslog()

Availability in PHP 4.0

Creating a system log message

Parameters

Parameter Data type Default value Note
$priority int not Priority is a combination of device and level. See table below for more info.
$message string not The message to be sent, except that the two %m characters will be replaced by the error message string (strerror) corresponding to the current errno value.

Possible values for the priority argument

Syslog priorities (in descending order):

Constant Description
LOG_EMERG system unusable
LOG_ALERT immediate action is required
LOG_CRIT critical conditions
LOG_ERR error conditions
LOG_WARNING
LOG_NOTICE normal but significant conditions
LOG_INFO information message
LOG_DEBUG debug level message

Return values

bool

Returns true on success, otherwise false on failure.

Other resources

Official syslog documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.