Merge branch 'daemon-ext'
[libi2ncommon] / src / log_macros.hpp
CommitLineData
0e23f538
TJ
1/*
2The software in this package is distributed under the GNU General
3Public License version 2 (with a special exception described below).
4
5A copy of GNU General Public License (GPL) is included in this distribution,
6in the file COPYING.GPL.
7
8As a special exception, if other files instantiate templates or use macros
9or inline functions from this file, or you compile this file and link it
10with other works to produce a work based on this file, this file
11does not by itself cause the resulting work to be covered
12by the GNU General Public License.
13
14However the source code for this file must still be made available
15in accordance with section (3) of the GNU General Public License.
16
17This exception does not invalidate any other reasons why a work based
18on this file might be covered by the GNU General Public License.
19*/
b6fb82a2
RP
20/** @file
21 * @brief macros to ease some common logging cases.
22 *
23 * The log macros are put into a file separate from the (base) logging files since
24 * every coder can decide if he/she want's to use these macros or not.
25 * (Not everyone like macros...)
26 *
27 *
0e23f538 28 * @author Reinhard Pfau
b6fb82a2
RP
29 *
30 * @copyright © Copyright 2008 by Intra2net AG
b6fb82a2
RP
31 *
32 */
33
34#ifndef __I2N_COMMON_LOG_MACROS_HPP__
35#define __I2N_COMMON_LOG_MACROS_HPP__
36
37#include "logfunc.hpp"
38
39
40/*
41**
42*/
43
44/**
45 * @brief to be inserted in prepared but unimplemented functions.
46 */
47#define UNIMPLEMENTED() do{ ::I2n::Logger::GlobalLogger.warning(HERE) << "not implemented"; }while(false)
48
49
50/**
51 * @brief to be inserted in places which should be never reached during normal program execution.
52 */
53#define NOT_REACHED() do{ ::I2n::Logger::GlobalLogger.alert(HERE) << "this part should not be reached"; }while(false)
54
55
56
57
58#endif