blocxx
LogConfig.hpp
Go to the documentation of this file.
1/*******************************************************************************
2* Copyright (C) 2004 Vintela, Inc. All rights reserved.
3* Copyright (C) 2005 Novell, Inc. All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7*
8* - Redistributions of source code must retain the above copyright notice,
9* this list of conditions and the following disclaimer.
10*
11* - Redistributions in binary form must reproduce the above copyright notice,
12* this list of conditions and the following disclaimer in the documentation
13* and/or other materials provided with the distribution.
14*
15* - Neither the name of Vintela, Inc., Novell, Inc., nor the names of its
16* contributors may be used to endorse or promote products derived from this
17* software without specific prior written permission.
18*
19* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
20* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22* ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc., Novell, Inc., OR THE
23* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30*******************************************************************************/
31
32
37#ifndef BLOCXX_LOGCONFIG_HPP_
38#define BLOCXX_LOGCONFIG_HPP_
39
40#include "blocxx/BLOCXX_config.h"
42#include "blocxx/LogLevel.hpp"
43
44namespace BLOCXX_NAMESPACE
45{
46
52
54
55
56#ifndef BLOCXX_DEFAULT_LOG_1_MAX_FILE_SIZE
57#define BLOCXX_DEFAULT_LOG_1_MAX_FILE_SIZE "0"
58#endif
59
60#ifndef BLOCXX_DEFAULT_LOG_1_MAX_BACKUP_INDEX
61#define BLOCXX_DEFAULT_LOG_1_MAX_BACKUP_INDEX "1"
62#endif
63
64#ifndef BLOCXX_DEFAULT_LOG_1_FLUSH
65#define BLOCXX_DEFAULT_LOG_1_FLUSH "true"
66#endif
67
68#ifndef BLOCXX_DEFAULT_LOG_1_SYSLOG_IDENTITY
69#define BLOCXX_DEFAULT_LOG_1_SYSLOG_IDENTITY BLOCXX_PACKAGE_PREFIX"blocxx"
70#endif
71
72#ifndef BLOCXX_DEFAULT_LOG_1_SYSLOG_FACILITY
73#define BLOCXX_DEFAULT_LOG_1_SYSLOG_FACILITY "user"
74#endif
75
76namespace LogConfigOptions
77{
78 extern const char* const LOG_1_LOCATION_opt;
79 extern const char* const LOG_1_MAX_FILE_SIZE_opt;
80 extern const char* const LOG_1_MAX_BACKUP_INDEX_opt;
81 extern const char* const LOG_1_FLUSH_opt;
82 extern const char* const LOG_1_SYSLOG_IDENTITY_opt;
83 extern const char* const LOG_1_SYSLOG_FACILITY_opt;
84
86 {
87 const char* name;
88 const char* defaultValue;
89 };
90 extern const NameAndDefault g_defaults[];
91 extern const NameAndDefault* const g_defaultsEnd;
92
93} // end namespace LogConfigOptions
94
95
96} // end namespace BLOCXX_NAMESPACE
97
98#endif // BLOCXX_LOGCONFIG_HPP_
const char *const LOG_1_SYSLOG_FACILITY_opt
Definition LogConfig.cpp:48
const NameAndDefault *const g_defaultsEnd
Definition LogConfig.cpp:62
const char *const LOG_1_SYSLOG_IDENTITY_opt
Definition LogConfig.cpp:47
const char *const LOG_1_MAX_FILE_SIZE_opt
Definition LogConfig.cpp:44
const char *const LOG_1_LOCATION_opt
Definition LogConfig.cpp:43
const char *const LOG_1_MAX_BACKUP_INDEX_opt
Definition LogConfig.cpp:45
const NameAndDefault g_defaults[]
Definition LogConfig.cpp:51
Taken from RFC 1321.
@ E_PRESERVE_PREVIOUS_CONFIG_ITEM
Definition LogConfig.hpp:49
@ E_OVERWRITE_PREVIOUS_CONFIG_ITEM
Definition LogConfig.hpp:50
SortedVectorMap< String, String > LoggerConfigMap
Definition LogConfig.hpp:53