|
NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
#include <Exceptions/NotImplementedException.hpp>#include <Exceptions/SignalHandling.hpp>#include <Identifiers/NESStrongTypeFormat.hpp>#include <Util/Logger/LogLevel.hpp>#include <Util/Logger/impl/NesLogger.hpp>#include <Util/StacktraceLoader.hpp>#include <iostream>#include <memory>#include <sstream>Classes | |
| struct | NES::LogCaller< L > |
| LogCaller is our compile-time trampoline to invoke the Logger method for the desired level of logging L. More... | |
| struct | NES::LogCaller< LogLevel::LOG_INFO > |
| struct | NES::LogCaller< LogLevel::LOG_TRACE > |
| struct | NES::LogCaller< LogLevel::LOG_DEBUG > |
| struct | NES::LogCaller< LogLevel::LOG_ERROR > |
| struct | NES::LogCaller< LogLevel::LOG_FATAL_ERROR > |
| struct | NES::LogCaller< LogLevel::LOG_WARNING > |
Namespaces | |
| NES | |
| This exception represents a network error. | |
Macros | |
| #define | NES_LOG(LEVEL, ...) |
| this is the new logging macro that is the entry point for logging calls More... | |
| #define | NES_TRACE(...) NES_LOG(NES::LogLevel::LOG_TRACE, __VA_ARGS__); |
| #define | NES_INFO(...) NES_LOG(NES::LogLevel::LOG_INFO, __VA_ARGS__); |
| #define | NES_DEBUG(...) NES_LOG(NES::LogLevel::LOG_DEBUG, __VA_ARGS__); |
| #define | NES_WARNING(...) NES_LOG(NES::LogLevel::LOG_WARNING, __VA_ARGS__); |
| #define | NES_ERROR(...) NES_LOG(NES::LogLevel::LOG_ERROR, __VA_ARGS__); |
| #define | NES_FATAL_ERROR(...) NES_LOG(NES::LogLevel::LOG_FATAL_ERROR, __VA_ARGS__); |
| #define | NES_VERIFY(CONDITION, TEXT) ((void) 0) |
| #define | NES_DEBUG_PRINT_TRACE false |
| #define | NES_ASSERT(CONDITION, TEXT) |
| #define | NES_ASSERT_THROW_EXCEPTION(CONDITION, EXCEPTION_TYPE, ...) |
| #define | NES_ASSERT2_FMT(CONDITION, ...) |
| #define | NES_THROW_RUNTIME_ERROR(...) |
| #define | NES_NOT_IMPLEMENTED() |
| #define | NES_ERROR_OR_THROW_RUNTIME(THROW_EXCEPTION, ...) |
| #define NES_ASSERT | ( | CONDITION, | |
| TEXT | |||
| ) |
| #define NES_ASSERT2_FMT | ( | CONDITION, | |
| ... | |||
| ) |
| #define NES_ASSERT_THROW_EXCEPTION | ( | CONDITION, | |
| EXCEPTION_TYPE, | |||
| ... | |||
| ) |
| #define NES_DEBUG | ( | ... | ) | NES_LOG(NES::LogLevel::LOG_DEBUG, __VA_ARGS__); |
| #define NES_DEBUG_PRINT_TRACE false |
| #define NES_ERROR | ( | ... | ) | NES_LOG(NES::LogLevel::LOG_ERROR, __VA_ARGS__); |
| #define NES_ERROR_OR_THROW_RUNTIME | ( | THROW_EXCEPTION, | |
| ... | |||
| ) |
| #define NES_FATAL_ERROR | ( | ... | ) | NES_LOG(NES::LogLevel::LOG_FATAL_ERROR, __VA_ARGS__); |
| #define NES_INFO | ( | ... | ) | NES_LOG(NES::LogLevel::LOG_INFO, __VA_ARGS__); |
| #define NES_LOG | ( | LEVEL, | |
| ... | |||
| ) |
this is the new logging macro that is the entry point for logging calls
| #define NES_NOT_IMPLEMENTED | ( | ) |
| #define NES_THROW_RUNTIME_ERROR | ( | ... | ) |
| #define NES_TRACE | ( | ... | ) | NES_LOG(NES::LogLevel::LOG_TRACE, __VA_ARGS__); |
| #define NES_VERIFY | ( | CONDITION, | |
| TEXT | |||
| ) | ((void) 0) |
I am aware that we do not like __ before variable names but here we need them to avoid name collions, e.g., __buffer, __stacktrace that should not be a problem because of the scope, however, better be safe than sorry :P Additionally, we do not want to print stack traces when the currentLogLevel, as passed over at runtime in tests for example, is lower than DEBUG. Also, NES_DEBUG_MODE should be enabled as well. For that we define NES_DEBUG_PRINT_TRACE. When a stack trace should not be printed, an empty string will be given over instead, which is then handled appropriately in invokeErrorHandlers/RunTimeException.
| #define NES_WARNING | ( | ... | ) | NES_LOG(NES::LogLevel::LOG_WARNING, __VA_ARGS__); |