]>
Commit | Line | Data |
---|---|---|
deaa50db DL |
1 | /* |
2 | * Zebra logging funcions. | |
3 | * Copyright (C) 1997, 1998, 1999 Kunihiro Ishiguro | |
4 | * | |
5 | * This file is part of GNU Zebra. | |
6 | * | |
7 | * GNU Zebra is free software; you can redistribute it and/or modify it | |
8 | * under the terms of the GNU General Public License as published by the | |
9 | * Free Software Foundation; either version 2, or (at your option) any | |
10 | * later version. | |
11 | * | |
12 | * GNU Zebra is distributed in the hope that it will be useful, but | |
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * General Public License for more details. | |
16 | * | |
896014f4 DL |
17 | * You should have received a copy of the GNU General Public License along |
18 | * with this program; see the file COPYING; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
deaa50db DL |
20 | */ |
21 | ||
22 | #ifndef _ZEBRA_LOG_PRIVATE_H | |
23 | #define _ZEBRA_LOG_PRIVATE_H | |
24 | ||
25 | #include "log.h" | |
26 | ||
d62a17ae | 27 | struct zlog { |
28 | const char *ident; /* daemon name (first arg to openlog) */ | |
29 | const char *protoname; | |
30 | u_short instance; | |
31 | int maxlvl[ZLOG_NUM_DESTS]; /* maximum priority to send to associated | |
32 | logging destination */ | |
33 | int default_lvl; /* maxlvl to use if none is specified */ | |
34 | FILE *fp; | |
35 | char *filename; | |
36 | int facility; /* as per syslog facility */ | |
37 | int record_priority; /* should messages logged through stdio include the | |
38 | priority of the message? */ | |
39 | int syslog_options; /* 2nd arg to openlog */ | |
40 | int timestamp_precision; /* # of digits of subsecond precision */ | |
deaa50db DL |
41 | }; |
42 | ||
43 | /* Default logging strucutre. */ | |
44 | extern struct zlog *zlog_default; | |
45 | ||
46 | extern const char *zlog_priority[]; | |
47 | ||
48 | /* Generic function for zlog. */ | |
d62a17ae | 49 | extern void vzlog(int priority, const char *format, va_list args); |
50 | extern void zlog(int priority, const char *format, ...) PRINTF_ATTRIBUTE(2, 3); | |
deaa50db DL |
51 | |
52 | #endif /* _ZEBRA_LOG_PRIVATE_H */ |