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
|
/* Logging definitions used in log.h and log_local.h
* Copyright (C) 2011 Chris Hall (GMCH), Highwayman
*
* This file is part of GNU Zebra.
*
* GNU Zebra is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* GNU Zebra is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Zebra; see the file COPYING. If not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef _ZEBRA_LOG_COMMON_H
#define _ZEBRA_LOG_COMMON_H
#include "misc.h"
#include <syslog.h>
/*==============================================================================
* This is for things which are required in log.h for external use, and in
* log_local.h for use within the log/command/vty family.
*/
/*------------------------------------------------------------------------------
* The protocols known to the logging system.
*/
typedef enum
{
ZLOG_NONE,
ZLOG_DEFAULT,
ZLOG_ZEBRA,
ZLOG_RIP,
ZLOG_BGP,
ZLOG_OSPF,
ZLOG_RIPNG,
ZLOG_OSPF6,
ZLOG_ISIS,
ZLOG_MASC
} zlog_proto_t;
/*------------------------------------------------------------------------------
* If maxlvl is set to ZLOG_DISABLED, then no messages will be sent
* to that logging destination.
*
* Note that logging levels with higher priority have lower numbers. So, this
* may (well) be -ve.
*/
enum { ZLOG_DISABLED = LOG_EMERG - 1 } ;
/*------------------------------------------------------------------------------
* The logging destinations supported.
*/
typedef enum
{
ZLOG_DEST_SYSLOG = 0,
ZLOG_DEST_FILE,
ZLOG_DEST_STDOUT,
ZLOG_DEST_MONITOR,
ZLOG_DEST_COUNT /* Number of destinations */
} zlog_dest_t;
/*------------------------------------------------------------------------------
*
*/
struct zlog ;
enum { timestamp_buffer_len = 32 } ;
#endif /* _ZEBRA_LOG_COMMON_H */
|