syslogDescriptionThe syslog() function sends messages to the system logger. On UNIX-like systems, this is generally syslogd (run man syslogd for more information). On the Windows family of operating systems, this is the event log. Not all flavors of the Windows operating systems have the event log facility - see your system's help files and manual for more information. The priority argument is a combination of the level and facility of the message. The message level indicates the severity of the log message; the facility tells the system logger what kind of program is logging a message. The system logger then decides what to do with the message based on how it's configured to handle the various levels and facilities. The priority argument is an integer value, but PHP provides a set of named constants to make the task of setting it easier. To combine the level constants with the facility constants, use the bitwise or (|) operator (for example, LOG_ERROR|LOG_AUTH_PRIV). The following tables list the levels and facilities.
NoteLOG_USER is the only valid log type under Windows operating systems.
CautionThe message argument should not contain sequences such as %s that are recognized by the printf() function. Literal percent symbols (%) can be included in the log message by using two percent symbols in a row (%%).
PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing
(Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch).
This material may be distributed only subject to the terms and conditions set forth
in the Open Publication License, v1.0 or later (the latest version is presently available at
http://www.opencontent.org/openpub/).
The authors of this book have elected not to choose any options under the OPL. This online book was obtained
from http://www.fooassociates.com/phpfer/
and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4
for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All
persons and entities shall have neither liability nor responsibility to any person or entity with respect to
any loss or damage arising from the information contained in this book.
|