File: syslog.h

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (89 lines) | stat: -rw-r--r-- 2,495 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 * $Id: syslog.h,v 1.1 2005/04/13 17:00:30 baud Exp $
 */

/*
 * Copyright (C) 1997-2001 by CERN/IT/PDP/IP
 * All rights reserved
 */
 
/*
 * @(#)$RCSfile: syslog.h,v $ $Revision: 1.1 $ $Date: 2005/04/13 17:00:30 $ CERN IT-PDP/IP Christoph von Praun
 */

#ifndef _SYSLOG_WIN32_H
#define _SYSLOG_WIN32_H 1

/*
 * priorities/facilities are encoded into a single 32-bit quantity, where the
 * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
 * (0-big number).  Both the priorities and the facilities map roughly
 * one-to-one to strings in the syslogd(8) source code.  This mapping is
 * included in this file.
 *
 * priorities (these are ordered)
 */

#define	LOG_EMERG	0		/* system is unusable */
#define	LOG_ALERT	1		/* action must be taken immediately */
#define	LOG_CRIT	2		/* critical conditions */
#define	LOG_ERR		3		/* error conditions */
#define	LOG_WARNING	4	/* warning conditions */
#define	LOG_NOTICE	5	/* normal but significant condition */
#define	LOG_INFO	6		/* informational */
#define	LOG_DEBUG	7		/* debug-level messages */

/*
 * Option flags for openlog.
 *
 */
#define	LOG_PID		0x01	  /* log the pid with each message */
#define	LOG_CONS	0x02	  /* log on the console if errors in sending */
#define	LOG_ODELAY	0x04	/* delay open until first syslog() (default) */
#define	LOG_NDELAY	0x08	/* don't delay open */
#define	LOG_NOWAIT	0x10	/* don't wait for console forks: DEPRECATED */
#define	LOG_PERROR	0x20	/* log to stderr as well */

/* 
 * Facility codes
 */

#define	LOG_KERN	(0<<3)	    /* kernel messages */
#define	LOG_USER	(1<<3)	    /* random user-level messages */
#define	LOG_MAIL	(2<<3)	    /* mail system */
#define	LOG_DAEMON	(3<<3)	  /* system daemons */
#define	LOG_AUTH	(4<<3)	    /* security/authorization messages */
#define	LOG_SYSLOG	(5<<3)	  /* messages generated internally by syslogd */
#define	LOG_LPR		(6<<3)	    /* line printer subsystem */
#define	LOG_NEWS	(7<<3)	    /* network news subsystem */
#define	LOG_UUCP	(8<<3)	    /* UUCP subsystem */
#define	LOG_CRON	(9<<3)	    /* clock daemon */
#define	LOG_AUTHPRIV	(10<<3)	/* security/authorization messages (private) */


#include <stdarg.h>

#ifdef  __cplusplus
extern "C" {
#endif

void	closelog(void);

/* 
 * program arguments are not used 
 * for openlog
 */
void	openlog(const char *, int, int);

/* 
 * not implemented
 * int	setlogmask(int); 
 */
void	syslog(int, const char *, ...);
void	vsyslog(int, const char *, va_list);

#ifdef  __cplusplus
}
#endif

#endif