LoggingMacros_MLOGGING.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 //----------------------------------------------------------------------
27 //----------------------------------------------------------------------
28 #ifndef ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING_H_INCLUDED
29 #define ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING_H_INCLUDED
30 
32 
33 #define MLOGGING_LOG_FLCO(streamname, level, filename, line, classname, objectname, arg) \
34  do { \
35  if (Debug()) \
36  { \
37  ::icl_core::logging::LogStream& stream = streamname::instance(); \
38  SLOGGING_LOG_FLCO(stream, level, filename, line, classname, objectname, arg); \
39  } \
40  } while (0)
41 #define MLOGGING_LOG_COF(streamname, level, classname, objectname, function, arg) MLOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, objectname, arg)
42 #define MLOGGING_LOG_C(streamname, level, classname, arg) MLOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, "", arg)
43 #define MLOGGING_LOG(streamname, level, arg) MLOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, "", "", arg)
44 
45 
46 #define MLOGGING_ERROR(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_ERROR, arg)
47 #define MLOGGING_WARNING(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_WARNING, arg)
48 #define MLOGGING_INFO(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_INFO, arg)
49 #ifdef _IC_DEBUG_
50 # define MLOGGING_DEBUG(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_DEBUG, arg)
51 # define MLOGGING_TRACE(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_TRACE, arg)
52 #else
53 # define MLOGGING_DEBUG(streamname, arg) (void)0
54 # define MLOGGING_TRACE(streamname, arg) (void)0
55 #endif
56 
57 
58 #define MLOGGING_ERROR_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_ERROR, classname, arg)
59 #define MLOGGING_WARNING_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_WARNING, classname, arg)
60 #define MLOGGING_INFO_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_INFO, classname, arg)
61 #ifdef _IC_DEBUG_
62 # define MLOGGING_DEBUG_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_DEBUG, classname, arg)
63 # define MLOGGING_TRACE_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_TRACE, classname, arg)
64 #else
65 # define MLOGGING_DEBUG_C(streamname, classname, arg) (void)0
66 # define MLOGGING_TRACE_C(streamname, classname, arg) (void)0
67 #endif
68 
69 
70 #define MLOGGING_ERROR_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_ERROR, classname, objectname, function, arg)
71 #define MLOGGING_WARNING_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_WARNING, classname, objectname, function, arg)
72 #define MLOGGING_INFO_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_INFO, classname, objectname, function, arg)
73 #ifdef _IC_DEBUG_
74 # define MLOGGING_DEBUG_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_DEBUG, classname, objectname, function, arg)
75 # define MLOGGING_TRACE_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_TRACE, classname, objectname, function, arg)
76 #else
77 # define MLOGGING_DEBUG_CO(streamname, classname, objectname, arg) (void)0
78 # define MLOGGING_TRACE_CO(streamname, classname, objectname, arg) (void)0
79 #endif
80 
81 
82 #endif
Defines SLOGGING logging macros.


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