OSDN Git Service

84931f8bc8f500eb6721efde7c2b5e09c8a9515d
[ultramonkey-l7/sslproxy.git] / logger / logger_enum.h
1 /*
2  * @file  logger_enum.h
3  * @brief logger module constants enumeration.
4  *
5  * L7VSD: Linux Virtual Server for Layer7 Load Balancing
6  * Copyright (C) 2008  NTT COMWARE Corporation.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *      
23  **********************************************************************/
24
25 #ifndef __LOGGER_ENUM_H__
26 #define __LOGGER_ENUM_H__
27
28 #include <string>
29 #include <log4cxx/level.h>
30
31 /*!
32  * LogLevel enumeration.
33  */
34 enum LOG_LEVEL_TAG
35 {
36         LOG_LV_NONE = 0,
37         LOG_LV_DEBUG,
38         LOG_LV_INFO,
39         LOG_LV_WARN,
40         LOG_LV_ERROR,
41         LOG_LV_FATAL
42 };
43
44 inline LOG_LEVEL_TAG& operator++(LOG_LEVEL_TAG& level) {
45         level = static_cast<LOG_LEVEL_TAG>(level + 1);
46         return level;
47 }
48
49 /*!
50  * Category enumeration.
51  * LOG_CAT_SSLPROXY_LOGGER should be first for logger log.
52  */
53 enum LOG_CATEGORY_TAG
54 {
55         LOG_CAT_NONE = 0,
56         LOG_CAT_SSLPROXY_LOGGER = 1,
57         LOG_CAT_SSLPROXY_PARAMETER,
58         LOG_CAT_SSLPROXY_COMMON,
59         LOG_CAT_SSLPROXY_SERVER,
60         LOG_CAT_SSLPROXY_SESSION,
61         LOG_CAT_SSLPROXY_CONNECTION,
62         LOG_CAT_HTTP,
63         LOG_CAT_END
64 };
65
66
67 inline LOG_CATEGORY_TAG& operator++(LOG_CATEGORY_TAG& cat) {
68         cat = static_cast<LOG_CATEGORY_TAG>(cat + 1);
69         return cat;
70 }
71
72 /*!
73  * Rotation enumeration.
74  */
75 enum LOG_ROTATION_TAG {
76         LOG_ROT_SIZE,
77         LOG_ROT_DATE,
78         LOG_ROT_DATESIZE
79 };
80
81 /*!
82  * RotationTiming enumeration.
83  */
84 enum LOG_ROTATION_TIMING_TAG {
85         LOG_TIM_YEAR,
86         LOG_TIM_MONTH,
87         LOG_TIM_WEEK,
88         LOG_TIM_DATE,
89         LOG_TIM_HOUR
90 };
91         
92 #endif  //__LOGGER_ENUM_H__