LoggingMacros_MLOGGING_FMT.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 //----------------------------------------------------------------------
22 //----------------------------------------------------------------------
23 #ifndef ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING__FMT_H_INCLUDED
24 #define ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING__FMT_H_INCLUDED
25 
27 
28 #define MLOGGING_FMT_LOG_FLCO(streamname, level, filename, line, classname, objectname, ...) \
29  do { \
30  if (Debug()) \
31  { \
32  ::icl_core::logging::LogStream& stream = streamname::instance(); \
33  SLOGGING_FMT_LOG_FLCO(stream, level, filename, line, classname, objectname, __VA_ARGS__); \
34  } \
35  } while (0)
36 #define MLOGGING_FMT_LOG_COF(streamname, level, classname, objectname, function, ...) MLOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, objectname, __VA_ARGS__)
37 #define MLOGGING_FMT_LOG_C(streamname, level, classname, ...) MLOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, "", __VA_ARGS__)
38 #define MLOGGING_FMT_LOG(streamname, level, ...) MLOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, "", "", __VA_ARGS__)
39 
40 
41 #define MLOGGING_FMT_ERROR(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_ERROR, __VA_ARGS__)
42 #define MLOGGING_FMT_WARNING(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_WARNING, __VA_ARGS__)
43 #define MLOGGING_FMT_INFO(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_INFO, __VA_ARGS__)
44 #ifdef _IC_DEBUG_
45 # define MLOGGING_FMT_DEBUG(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_DEBUG, __VA_ARGS__)
46 # define MLOGGING_FMT_TRACE(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_TRACE, __VA_ARGS__)
47 #else
48 # define MLOGGING_FMT_DEBUG(streamname, ...) (void)0
49 # define MLOGGING_FMT_TRACE(streamname, ...) (void)0
50 #endif
51 
52 
53 #define MLOGGING_FMT_ERROR_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_ERROR, classname, __VA_ARGS__)
54 #define MLOGGING_FMT_WARNING_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_WARNING, classname, __VA_ARGS__)
55 #define MLOGGING_FMT_INFO_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_INFO, classname, __VA_ARGS__)
56 #ifdef _IC_DEBUG_
57 # define MLOGGING_FMT_DEBUG_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_DEBUG, classname, __VA_ARGS__)
58 # define MLOGGING_FMT_TRACE_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_TRACE, classname, __VA_ARGS__)
59 #else
60 # define MLOGGING_FMT_DEBUG_C(streamname, classname, ...) (void)0
61 # define MLOGGING_FMT_TRACE_C(streamname, classname, ...) (void)0
62 #endif
63 
64 
65 #define MLOGGING_FMT_ERROR_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_ERROR, classname, objectname, function, __VA_ARGS__)
66 #define MLOGGING_FMT_WARNING_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_WARNING, classname, objectname, function, __VA_ARGS__)
67 #define MLOGGING_FMT_INFO_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_INFO, classname, objectname, function, __VA_ARGS__)
68 #ifdef _IC_DEBUG_
69 # define MLOGGING_FMT_DEBUG_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_DEBUG, classname, objectname, function, __VA_ARGS__)
70 # define MLOGGING_FMT_TRACE_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_TRACE, classname, objectname, function, __VA_ARGS__)
71 #else
72 # define MLOGGING_FMT_DEBUG_CO(streamname, classname, objectname, ...) (void)0
73 # define MLOGGING_FMT_TRACE_CO(streamname, classname, objectname, ...) (void)0
74 #endif
75 
76 
77 #endif


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