LoggingMacros_LOGGING.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
26 //----------------------------------------------------------------------
27 #ifndef ICL_CORE_LOGGING_LOGGING_MACROS__LOGGING_H_INCLUDED
28 #define ICL_CORE_LOGGING_LOGGING_MACROS__LOGGING_H_INCLUDED
29 
31 
32 #define LOGGING_LOG_FLCO(streamname, level, filename, line, classname, objectname, arg) \
33  do { \
34  ::icl_core::logging::LogStream& stream = streamname::instance(); \
35  SLOGGING_LOG_FLCO(stream, level, filename, line, classname, objectname, arg); \
36  } while (0)
37 #define LOGGING_LOG_CO(streamname, level, classname, objectname, arg) LOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, objectname, arg)
38 #define LOGGING_LOG_C(streamname, level, classname, arg) LOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, "", arg)
39 #define LOGGING_LOG(streamname, level, arg) LOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, "", "", arg)
40 
41 
42 #define LOGGING_ERROR(streamname, arg) LOGGING_LOG(streamname, ::icl_core::logging::eLL_ERROR, arg)
43 #define LOGGING_WARNING(streamname, arg) LOGGING_LOG(streamname, ::icl_core::logging::eLL_WARNING, arg)
44 #define LOGGING_INFO(streamname, arg) LOGGING_LOG(streamname, ::icl_core::logging::eLL_INFO, arg)
45 #ifdef _IC_DEBUG_
46 # define LOGGING_DEBUG(streamname, arg) LOGGING_LOG(streamname, ::icl_core::logging::eLL_DEBUG, arg)
47 # define LOGGING_TRACE(streamname, arg) LOGGING_LOG(streamname, ::icl_core::logging::eLL_TRACE, arg)
48 #else
49 # define LOGGING_DEBUG(streamname, arg) (void)0
50 # define LOGGING_TRACE(streamname, arg) (void)0
51 #endif
52 
53 
54 #define LOGGING_ERROR_C(streamname, classname, arg) LOGGING_LOG_C(streamname, ::icl_core::logging::eLL_ERROR, classname, arg)
55 #define LOGGING_WARNING_C(streamname, classname, arg) LOGGING_LOG_C(streamname, ::icl_core::logging::eLL_WARNING, classname, arg)
56 #define LOGGING_INFO_C(streamname, classname, arg) LOGGING_LOG_C(streamname, ::icl_core::logging::eLL_INFO, classname, arg)
57 #ifdef _IC_DEBUG_
58 # define LOGGING_DEBUG_C(streamname, classname, arg) LOGGING_LOG_C(streamname, ::icl_core::logging::eLL_DEBUG, classname, arg)
59 # define LOGGING_TRACE_C(streamname, classname, arg) LOGGING_LOG_C(streamname, ::icl_core::logging::eLL_TRACE, classname, arg)
60 #else
61 # define LOGGING_DEBUG_C(streamname, classname, arg) (void)0
62 # define LOGGING_TRACE_C(streamname, classname, arg) (void)0
63 #endif
64 
65 
66 #define LOGGING_ERROR_CO(stream, classname, objectname, arg) LOGGING_LOG_CO(stream, ::icl_core::logging::eLL_ERROR, classname, objectname, arg)
67 #define LOGGING_WARNING_CO(stream, classname, objectname, arg) LOGGING_LOG_CO(stream, ::icl_core::logging::eLL_WARNING, classname, objectname, arg)
68 #define LOGGING_INFO_CO(stream, classname, objectname, arg) LOGGING_LOG_CO(stream, ::icl_core::logging::eLL_INFO, classname, objectname, arg)
69 #ifdef _IC_DEBUG_
70 # define LOGGING_DEBUG_CO(stream, classname, objectname, arg) LOGGING_LOG_CO(stream, ::icl_core::logging::eLL_DEBUG, classname, objectname, arg)
71 # define LOGGING_TRACE_CO(stream, classname, objectname, arg) LOGGING_LOG_CO(stream, ::icl_core::logging::eLL_TRACE, classname, objectname, arg)
72 #else
73 # define LOGGING_DEBUG_CO(stream, classname, objectname, arg) (void)0
74 # define LOGGING_TRACE_CO(stream, classname, objectname, arg) (void)0
75 #endif
76 
77 
78 #endif
Defines SLOGGING logging macros.


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58