Gen. partnerAlgotech

PHP function syslog()

Creating a system log message

|
September 11, 2019

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

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.