Go to the documentation of this file. 27 #ifndef ICL_CORE_LOGGING_LOGGING_MACROS__SLOGGING_H_INCLUDED 28 #define ICL_CORE_LOGGING_LOGGING_MACROS__SLOGGING_H_INCLUDED 31 #include <android/log.h> 36 #define SLOGGING_LOG_FLCO(stream, level, filename, line, classname, objectname, arg) \ 38 if (stream.isActive()) \ 40 if (stream.getLogLevel() <= level) \ 42 std::stringstream str; \ 45 case ::icl_core::logging::eLL_TRACE: __android_log_print(ANDROID_LOG_VERBOSE, stream.nameCStr(), str.str().c_str()); break; \ 46 case ::icl_core::logging::eLL_DEBUG: __android_log_print(ANDROID_LOG_DEBUG, stream.nameCStr(), str.str().c_str()); break; \ 47 case ::icl_core::logging::eLL_INFO: __android_log_print(ANDROID_LOG_INFO, stream.nameCStr(), str.str().c_str()); break; \ 48 case ::icl_core::logging::eLL_WARNING: __android_log_print(ANDROID_LOG_WARN, stream.nameCStr(), str.str().c_str()); break; \ 49 default: __android_log_print(ANDROID_LOG_UNKNOWN, stream.nameCStr(), str.str().c_str()); break; \ 55 #define SLOGGING_LOG_FLCO(stream, level, filename, line, classname, objectname, arg) \ 57 if (stream.isActive()) \ 59 if (stream.getLogLevel() <= level) \ 61 ::icl_core::logging::ThreadStream& thread_stream=stream.threadStream(level); \ 62 thread_stream.setLineLogLevel(level); \ 63 thread_stream.setFilename(filename); \ 64 thread_stream.setLine(line); \ 65 thread_stream.setClassname(classname); \ 66 thread_stream.setObjectname(objectname); \ 67 thread_stream.setFunction(__FUNCTION__); \ 68 thread_stream << arg; \ 73 #define SLOGGING_LOG_CO(stream, level, classname, objectname, arg) SLOGGING_LOG_FLCO(stream, level, __FILE__, __LINE__, #classname, objectname, arg) 74 #define SLOGGING_LOG_C(stream, level, classname, arg) SLOGGING_LOG_FLCO(stream, level, __FILE__, __LINE__, #classname, "", arg) 75 #define SLOGGING_LOG(stream, level, arg) SLOGGING_LOG_FLCO(stream, level, __FILE__, __LINE__, "", "", arg) 78 #define SLOGGING_ERROR(stream, arg) SLOGGING_LOG(stream, ::icl_core::logging::eLL_ERROR, arg) 79 #define SLOGGING_WARNING(stream, arg) SLOGGING_LOG(stream, ::icl_core::logging::eLL_WARNING, arg) 80 #define SLOGGING_INFO(stream, arg) SLOGGING_LOG(stream, ::icl_core::logging::eLL_INFO, arg) 82 # define SLOGGING_DEBUG(stream, arg) SLOGGING_LOG(stream, ::icl_core::logging::eLL_DEBUG, arg) 83 # define SLOGGING_TRACE(stream, arg) SLOGGING_LOG(stream, ::icl_core::logging::eLL_TRACE, arg) 85 # define SLOGGING_DEBUG(stream, arg) (void)0 86 # define SLOGGING_TRACE(stream, arg) (void)0 90 #define SLOGGING_ERROR_C(stream, classname, arg) SLOGGING_LOG_C(stream, ::icl_core::logging::eLL_ERROR, classname, arg) 91 #define SLOGGING_WARNING_C(stream, classname, arg) SLOGGING_LOG_C(stream, ::icl_core::logging::eLL_WARNING, classname, arg) 92 #define SLOGGING_INFO_C(stream, classname, arg) SLOGGING_LOG_C(stream, ::icl_core::logging::eLL_INFO, classname, arg) 94 # define SLOGGING_DEBUG_C(stream, classname, arg) SLOGGING_LOG_C(stream, ::icl_core::logging::eLL_DEBUG, classname, arg) 95 # define SLOGGING_TRACE_C(stream, classname, arg) SLOGGING_LOG_C(stream, ::icl_core::logging::eLL_TRACE, classname, arg) 97 # define SLOGGING_DEBUG_C(stream, classname, arg) (void)0 98 # define SLOGGING_TRACE_C(stream, classname, arg) (void)0 102 #define SLOGGING_ERROR_CO(stream, classname, objectname, arg) SLOGGING_LOG_CO(stream, ::icl_core::logging::eLL_ERROR, classname, objectname, arg) 103 #define SLOGGING_WARNING_CO(stream, classname, objectname, arg) SLOGGING_LOG_CO(stream, ::icl_core::logging::eLL_WARNING, classname, objectname, arg) 104 #define SLOGGING_INFO_CO(stream, classname, objectname, arg) SLOGGING_LOG_CO(stream, ::icl_core::logging::eLL_INFO, classname, objectname, arg) 106 # define SLOGGING_DEBUG_CO(stream, classname, objectname, arg) SLOGGING_LOG_CO(stream, ::icl_core::logging::eLL_DEBUG, classname, objectname, arg) 107 # define SLOGGING_TRACE_CO(stream, classname, objectname, arg) SLOGGING_LOG_CO(stream, ::icl_core::logging::eLL_TRACE, classname, objectname, arg) 109 # define SLOGGING_DEBUG_CO(stream, classname, objectname, arg) (void)0 110 # define SLOGGING_TRACE_CO(stream, classname, objectname, arg) (void)0
fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58