taskrambler
0.1.9
Web server and task management solution.
Main Page
Related Pages
Data Structures
Files
File List
Globals
logger/logger.h
Go to the documentation of this file.
1
/**
2
* \file
3
* A generic logger class and two extended classes, One that logs to
4
* stderr and one that logs to the system syslog.
5
*
6
* \author Georg Hopp
7
*
8
* \copyright
9
* Copyright © 2012 Georg Hopp
10
*
11
* This program is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation, either version 3 of the License, or
14
* (at your option) any later version.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
20
*
21
* You should have received a copy of the GNU General Public License
22
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
*/
24
25
#ifndef __LOGGER_LOGGER_H__
26
#define __LOGGER_LOGGER_H__
27
28
#include "class.h"
29
30
typedef
enum
logger_level
{
31
LOGGER_DEBUG
=0,
32
LOGGER_INFO
,
33
LOGGER_NOTICE
,
34
LOGGER_WARNING
,
35
LOGGER_ERR
,
36
LOGGER_CRIT
,
37
LOGGER_ALERT
,
38
LOGGER_EMERG
39
}
logger_level
;
40
41
extern
const
char
*
const
logger_level_str
[];
42
43
CLASS
(Logger) {
44
logger_level
min_level;
45
};
46
47
CLASS
(LoggerStderr) {
48
EXTENDS
(Logger);
49
};
50
51
CLASS
(LoggerSyslog) {
52
EXTENDS
(Logger);
53
};
54
55
#endif // __LOGGER_LOGGER_H__
56
57
// vim: set ts=4 sw=4:
LOGGER_INFO
Definition:
logger/logger.h:32
LOGGER_ALERT
Definition:
logger/logger.h:37
LOGGER_EMERG
Definition:
logger/logger.h:38
logger_level_str
const char *const logger_level_str[]
Definition:
logger.c:31
logger_level
logger_level
Definition:
logger/logger.h:30
LOGGER_DEBUG
Definition:
logger/logger.h:31
LOGGER_CRIT
Definition:
logger/logger.h:36
LOGGER_NOTICE
Definition:
logger/logger.h:33
EXTENDS
#define EXTENDS(parent)
Definition:
class/class.h:49
LOGGER_WARNING
Definition:
logger/logger.h:34
CLASS
CLASS(Logger)
Definition:
logger/logger.h:43
LOGGER_ERR
Definition:
logger/logger.h:35
include
logger
logger.h
Generated on Wed Apr 13 2016 23:19:31 for taskrambler by
1.8.10