O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

syslog

Synopsis

bool syslog(int priority, string message)

Sends an error message to the system logging facility. On Unix systems, this is syslog(3); on Windows NT, the messages are logged in the NT Event Log. The message is logged with the given priority, which is one of the following (listed in decreasing order of priority):

LOG_EMERG

Error has caused the system to be unstable

LOG_ALERT

Error notes a situation that requires immediate action

LOG_CRIT

Error is a critical condition

LOG_ERR

Error is a general error condition

LOG_WARNING

Error message is a warning

LOG_NOTICE

Error message is a normal, but significant, condition

LOG_INFO

Error is an informational message that requires no action

LOG_DEBUG

Error is for debugging only

If message contains the characters %m, they are replaced with the current error message, if any is set. Returns true if the logging succeeded and false if a failure occurred.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required