]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/statd/log.h
Initial revision
[nfs-utils.git] / utils / statd / log.h
1 /*
2  * Copyright (C) 1995 Olaf Kirch
3  * Modified by Jeffrey A. Uphoff, 1996, 1997, 1999.
4  *
5  * NSM for Linux.
6  */
7
8 /*
9  *      logging functionality
10  *      260295  okir
11  */
12
13 #ifndef _LOCKD_LOG_H_
14 #define _LOCKD_LOG_H_
15
16 #include <syslog.h>
17
18 void    log_init(char *name);
19 void    log_background(void);
20 void    log_enable(int facility);
21 int     log_enabled(int facility);
22 void    log(int level, char *fmt, ...);
23 void    die(char *fmt, ...);
24
25 /*
26  * Map per-application severity to system severity. What's fatal for
27  * lockd is merely an itching spot from the universe's point of view.
28  */
29 #define L_CRIT          LOG_CRIT
30 #define L_FATAL         LOG_ERR
31 #define L_ERROR         LOG_WARNING
32 #define L_WARNING       LOG_NOTICE
33 #define L_DEBUG         LOG_DEBUG
34
35 #ifdef DEBUG
36 #define dprintf         log
37 #else
38 #define dprintf         if (0) log
39 #endif
40
41 #endif /* _LOCKD_LOG_H_ */