Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
liblogger.h
1
2
/***************************************************************************
3
* liblogger.h - Fawkes lib logger
4
*
5
* Created: Mon May 07 15:19:34 2007
6
* Copyright 2006-2007 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
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 Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef __UTILS_LOGGING_LIBLOGGER_H_
25
#define __UTILS_LOGGING_LIBLOGGER_H_
26
27
#include <core/exception.h>
28
#include <cstdarg>
29
#include <cstddef>
30
31
namespace
fawkes {
32
33
34
class
MultiLogger;
35
class
Logger;
36
class
Mutex;
37
38
class
LibLogger
39
{
40
public
:
41
static
void
init
(
MultiLogger
*multi_logger = NULL);
42
static
void
finalize
();
43
44
static
void
add_logger
(
Logger
*logger);
45
static
void
remove_logger
(
Logger
*logger);
46
47
static
void
log_debug
(
const
char
*component,
const
char
*format, ...);
48
static
void
log_info
(
const
char
*component,
const
char
*format, ...);
49
static
void
log_warn
(
const
char
*component,
const
char
*format, ...);
50
static
void
log_error
(
const
char
*component,
const
char
*format, ...);
51
52
static
void
vlog_debug
(
const
char
*component,
const
char
*format, va_list va);
53
static
void
vlog_info
(
const
char
*component,
const
char
*format, va_list va);
54
static
void
vlog_warn
(
const
char
*component,
const
char
*format, va_list va);
55
static
void
vlog_error
(
const
char
*component,
const
char
*format, va_list va);
56
57
static
void
log_debug
(
const
char
*component,
Exception
&e);
58
static
void
log_info
(
const
char
*component,
Exception
&e);
59
static
void
log_warn
(
const
char
*component,
Exception
&e);
60
static
void
log_error
(
const
char
*component,
Exception
&e);
61
62
private
:
63
LibLogger
(){};
64
65
static
MultiLogger
*logger;
66
static
Mutex
*mutex;
67
};
68
69
70
}
// end namespace fawkes
71
72
#endif
src
libs
logging
liblogger.h
Generated by
1.8.3.1