Fawkes API  Fawkes Development Version
logger_employer.h
1 
2 /***************************************************************************
3  * logger_employer.h - Fawkes logger employer
4  *
5  * Created: Wed Feb 11 22:26:27 2009
6  * Copyright 2006-2011 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 __LOGGING_LOGGER_EMPLOYER_H_
25 #define __LOGGING_LOGGER_EMPLOYER_H_
26 
27 namespace fawkes {
28 
29 class Logger;
30 
31 /** Logger employer
32  * The LoggerEmployer shall pipe all log messages of the system to
33  * added loggers.
34  * @author Tim Niemueller
35  */
37 {
38  public:
39  /** Virtual empty destructor. */
40  virtual ~LoggerEmployer() {}
41 
42  /** Add a new logger.
43  * An exception should be thrown if anything prevents this from succeeding.
44  * @param logger logger to add
45  */
46  virtual void add_logger(Logger *logger) = 0;
47 
48  /** Remove a logger.
49  * An exception should be thrown if anything prevents this from succeeding.
50  * @param logger logger to remove
51  */
52  virtual void remove_logger(Logger *logger) = 0;
53 };
54 
55 } // end of namespace fawkes
56 
57 #endif
virtual void add_logger(Logger *logger)=0
Add a new logger.
Fawkes library namespace.
virtual ~LoggerEmployer()
Virtual empty destructor.
Logger employer The LoggerEmployer shall pipe all log messages of the system to added loggers...
virtual void remove_logger(Logger *logger)=0
Remove a logger.
Interface for logging.
Definition: logger.h:34