libzypp
13.10.6
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Logger.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_BASE_LOGGER_H
13
#define ZYPP_BASE_LOGGER_H
14
15
#include <iosfwd>
16
#include <cstring>
17
39
40
#ifndef ZYPP_BASE_LOGGER_LOGGROUP
41
42
#define ZYPP_BASE_LOGGER_LOGGROUP "DEFINE_LOGGROUP"
43
#endif
44
45
#define XXX _XXX( ZYPP_BASE_LOGGER_LOGGROUP )
46
#define DBG _DBG( ZYPP_BASE_LOGGER_LOGGROUP )
47
#define MIL _MIL( ZYPP_BASE_LOGGER_LOGGROUP )
48
#define WAR _WAR( ZYPP_BASE_LOGGER_LOGGROUP )
49
#define ERR _ERR( ZYPP_BASE_LOGGER_LOGGROUP )
50
#define SEC _SEC( ZYPP_BASE_LOGGER_LOGGROUP )
51
#define INT _INT( ZYPP_BASE_LOGGER_LOGGROUP )
52
#define USR _USR( ZYPP_BASE_LOGGER_LOGGROUP )
53
54
#define _XXX(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_XXX )
55
#define _DBG(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP"++", zypp::base::logger::E_MIL )
56
#define _MIL(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_MIL )
57
#define _WAR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_WAR )
58
#define _ERR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_ERR )
59
#define _SEC(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_SEC )
60
#define _INT(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_INT )
61
#define _USR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_USR )
62
63
#define _BASEFILE ( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ )
64
66
#define ZYPP_BASE_LOGGER_LOG(GROUP,LEVEL) \
67
zypp::base::logger::getStream( GROUP, LEVEL, _BASEFILE, __FUNCTION__, __LINE__ )
68
71
namespace
zypp
73
{
74
namespace
base
76
{
77
79
namespace
logger
80
{
81
86
enum
LogLevel
{
87
E_XXX
= 999,
88
E_DBG
= 0,
89
E_MIL
,
90
E_WAR
,
91
E_ERR
,
92
E_SEC
,
93
E_INT
,
94
E_USR
95
};
96
107
extern
std::ostream &
getStream
(
const
char
* group_r,
108
LogLevel
level_r,
109
const
char
* file_r,
110
const
char
* func_r,
111
const
int
line_r );
112
extern
bool
isExcessive
();
113
115
}
// namespace logger
117
119
}
// namespace base
122
}
// namespace zypp
124
#endif // ZYPP_BASE_LOGGER_H
zypp::base::logger::isExcessive
bool isExcessive()
Definition:
LogControl.cc:388
zypp::base::logger::E_INT
Internal error.
Definition:
Logger.h:93
zypp::base::logger::LogLevel
LogLevel
Definition of log levels.
Definition:
Logger.h:86
zypp::base::logger::E_DBG
Debug or verbose.
Definition:
Logger.h:88
zypp::base::logger::E_WAR
Warning.
Definition:
Logger.h:90
zypp::base::logger::E_USR
User log.
Definition:
Logger.h:94
zypp::base::logger::E_SEC
Secutrity related.
Definition:
Logger.h:92
zypp::base::logger::E_MIL
Milestone.
Definition:
Logger.h:89
zypp::base::logger::E_ERR
Error.
Definition:
Logger.h:91
zypp::base::logger::E_XXX
Excessive logging.
Definition:
Logger.h:87
zypp::base::logger::getStream
std::ostream & getStream(const char *group_r, LogLevel level_r, const char *file_r, const char *func_r, const int line_r)
Return a log stream to write on.
Definition:
LogControl.cc:365
zypp
base
Logger.h
Generated by
1.8.5