| 1 | /* |
| 2 | The software in this package is distributed under the GNU General |
| 3 | Public License version 2 (with a special exception described below). |
| 4 | |
| 5 | A copy of GNU General Public License (GPL) is included in this distribution, |
| 6 | in the file COPYING.GPL. |
| 7 | |
| 8 | As a special exception, if other files instantiate templates or use macros |
| 9 | or inline functions from this file, or you compile this file and link it |
| 10 | with other works to produce a work based on this file, this file |
| 11 | does not by itself cause the resulting work to be covered |
| 12 | by the GNU General Public License. |
| 13 | |
| 14 | However the source code for this file must still be made available |
| 15 | in accordance with section (3) of the GNU General Public License. |
| 16 | |
| 17 | This exception does not invalidate any other reasons why a work based |
| 18 | on this file might be covered by the GNU General Public License. |
| 19 | */ |
| 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 | * |
| 28 | * @author Reinhard Pfau |
| 29 | * |
| 30 | * @copyright © Copyright 2008 by Intra2net AG |
| 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 |