Back to index

php5  5.3.10
syslog.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Sterling Hughes <sterling@php.net>                           |
00016    +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: syslog.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef SYSLOG_H
00022 #define       SYSLOG_H
00023 #define WIN32_LEAN_AND_MEAN
00024 #include <windows.h>
00025 
00026 #define       LOG_EMERG     1
00027 #define       LOG_ALERT     1
00028 #define       LOG_CRIT      1
00029 #define       LOG_ERR              4
00030 #define       LOG_WARNING   5
00031 #define       LOG_NOTICE    6
00032 #define       LOG_INFO      6
00033 #define       LOG_DEBUG     6
00034 
00035 #define       LOG_PRIMASK   0x07
00036 
00037 #define       LOG_PRI(p)    ((p) & LOG_PRIMASK)
00038 #define       LOG_MAKEPRI(fac, pri)       (((fac) << 3) | (pri))
00039 
00040 #define       LOG_KERN      (0<<3)
00041 #define       LOG_USER      (1<<3)
00042 #define       LOG_MAIL      (2<<3)
00043 #define       LOG_DAEMON    (3<<3)
00044 #define       LOG_AUTH      (4<<3)
00045 #define       LOG_SYSLOG    (5<<3)
00046 #define       LOG_LPR              (6<<3)
00047 #define       LOG_NEWS      (7<<3)
00048 #define       LOG_UUCP      (8<<3)
00049 #define       LOG_CRON      (9<<3)
00050 #define       LOG_AUTHPRIV  (10<<3)
00051 
00052 #define       LOG_NFACILITIES      10
00053 #define       LOG_FACMASK   0x03f8
00054 #define       LOG_FAC(p)    (((p) & LOG_FACMASK) >> 3)
00055 
00056 #define       LOG_MASK(pri) (1 << (pri))
00057 #define       LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
00058 
00059 /*
00060  * Option flags for openlog.
00061  *
00062  * LOG_ODELAY no longer does anything.
00063  * LOG_NDELAY is the inverse of what it used to be.
00064  */
00065 #define LOG_PID         0x01       /* log the pid with each message */
00066 #define LOG_CONS        0x02       /* log on the console if errors in sending */
00067 #define LOG_ODELAY      0x04       /* delay open until first syslog() (default) */
00068 #define LOG_NDELAY      0x08       /* don't delay open */
00069 #define LOG_NOWAIT      0x10       /* don't wait for console forks: DEPRECATED */
00070 #define LOG_PERROR      0x20       /* log to stderr as well */
00071 
00072 
00073 extern void closelog(void);
00074 extern void openlog(const char *, int, int);
00075 extern void syslog(int, const char *, ...);
00076 
00077 
00078 #endif                                           /* SYSLOG_H */