|
olp-cpp-sdk
1.23.1
|
Provides the main interface for the logging library. More...
#include <cinttypes>#include <cstdlib>#include <sstream>#include <string>#include <olp/core/logging/Format.h>#include <olp/core/logging/Level.h>#include <olp/core/CoreApi.h>#include <olp/core/utils/WarningWorkarounds.h>#include <boost/optional.hpp>
Go to the source code of this file.
Classes | |
| class | olp::logging::NullLogStream |
| Used for disabled logs at compile time. More... | |
| class | olp::logging::Log |
| A primary interface for log messages. More... | |
Namespaces | |
| olp | |
| Rules all the other namespaces. | |
Macros | |
| #define | OLP_SDK_LOG_FUNCTION_SIGNATURE __FUNCTION__ |
| Gets the current function signature for different compilers. | |
| #define | OLP_SDK_LOG_FILE __FILE__ |
| #define | OLP_SDK_LOG_LINE __LINE__ |
| #define | OLP_SDK_LOG_FUNCTION __FUNCTION__ |
| #define | OLP_SDK_DO_LOG(level, tag, message) |
| Logs a message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_CRITICAL(level, tag, message) OLP_SDK_DO_LOG(level, tag, message) |
| Logs a "Critical" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_CRITICAL_INFO(tag, message) OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Info, tag, message) |
| Logs a "Critical info" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_CRITICAL_WARNING(tag, message) OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Warning, tag, message) |
| Logs a "Critical warning" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_CRITICAL_ERROR(tag, message) OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Error, tag, message) |
| Logs a "Critical error" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_FATAL(tag, message) OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Fatal, tag, message) |
| Logs a "Fatal error" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_ABORT(tag, message) |
| Logs a "Critical fatal error" message using C++ style streams, and then aborts the program. More... | |
| #define | OLP_SDK_DO_LOG_F(level, tag, ...) |
| Logs a message using the printf-style formatting. More... | |
| #define | OLP_SDK_LOG_CRITICAL_F(level, tag, ...) OLP_SDK_DO_LOG_F(level, tag, __VA_ARGS__) |
| Logs a "Critical" message using the printf-style formatting. More... | |
| #define | OLP_SDK_LOG_CRITICAL_INFO_F(tag, ...) OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Info, tag, __VA_ARGS__) |
| Logs a "Critical info" message using the printf-style formatting. More... | |
| #define | OLP_SDK_LOG_CRITICAL_WARNING_F(tag, ...) OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Warning, tag, __VA_ARGS__) |
| Logs a "Critical warning" message using the printf-style formatting. More... | |
| #define | OLP_SDK_LOG_CRITICAL_ERROR_F(tag, ...) OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Error, tag, __VA_ARGS__) |
| Logs a "Critical error" message using the printf-style formatting. More... | |
| #define | OLP_SDK_LOG_FATAL_F(tag, ...) OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Fatal, tag, __VA_ARGS__) |
| Logs a "Critical fatal error" message using the printf-style formatting. More... | |
| #define | OLP_SDK_LOG_ABORT_F(tag, ...) |
| Logs a "Critical fatal error" message using the printf-style formatting, and then abort sthe program. More... | |
| #define | OLP_SDK_LOG(level, tag, message) |
| Logs a message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_TRACE(tag, message) OLP_SDK_LOG(::olp::logging::Level::Trace, tag, message) |
| Logs a "Trace" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_DEBUG(tag, message) OLP_SDK_LOG(::olp::logging::Level::Debug, tag, message) |
| Logs a "Debug" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_INFO(tag, message) OLP_SDK_LOG(::olp::logging::Level::Info, tag, message) |
| Logs an "Info" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_WARNING(tag, message) OLP_SDK_LOG(::olp::logging::Level::Warning, tag, message) |
| Logs a "Warning" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_ERROR(tag, message) OLP_SDK_LOG(::olp::logging::Level::Error, tag, message) |
| Logs an "Error" message using C++ style streams. More... | |
| #define | OLP_SDK_LOG_F(level, tag, ...) |
| Logs a message using the printf style formatting. More... | |
| #define | OLP_SDK_LOG_TRACE_F(tag, ...) OLP_SDK_LOG_F(::olp::logging::Level::Trace, tag, __VA_ARGS__) |
| Logs a "Trace" message using the printf style formatting. More... | |
| #define | OLP_SDK_LOG_DEBUG_F(tag, ...) OLP_SDK_LOG_F(::olp::logging::Level::Debug, tag, __VA_ARGS__) |
| Logs a "Debug" message using the printf style formatting. More... | |
| #define | OLP_SDK_LOG_INFO_F(tag, ...) OLP_SDK_LOG_F(::olp::logging::Level::Info, tag, __VA_ARGS__) |
| Logs an "Info" message using the printf style formatting. More... | |
| #define | OLP_SDK_LOG_WARNING_F(tag, ...) OLP_SDK_LOG_F(::olp::logging::Level::Warning, tag, __VA_ARGS__) |
| Logs a "Warning" message using the printf style formatting. More... | |
| #define | OLP_SDK_LOG_ERROR_F(tag, ...) OLP_SDK_LOG_F(::olp::logging::Level::Error, tag, __VA_ARGS__) |
| Logs an "Eror" message using the printf style formatting. More... | |
Provides the main interface for the logging library.
| #define OLP_SDK_DO_LOG | ( | level, | |
| tag, | |||
| message | |||
| ) |
Logs a message using C++ style streams.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| level | The log level. |
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_DO_LOG_F | ( | level, | |
| tag, | |||
| ... | |||
| ) |
Logs a message using the printf-style formatting.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| level | The log level. |
| tag | The tag for the log component. |
| #define OLP_SDK_LOG | ( | level, | |
| tag, | |||
| message | |||
| ) |
Logs a message using C++ style streams.
| level | The log level. |
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_ABORT | ( | tag, | |
| message | |||
| ) |
Logs a "Critical fatal error" message using C++ style streams, and then aborts the program.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_ABORT_F | ( | tag, | |
| ... | |||
| ) |
Logs a "Critical fatal error" message using the printf-style formatting, and then abort sthe program.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_CRITICAL | ( | level, | |
| tag, | |||
| message | |||
| ) | OLP_SDK_DO_LOG(level, tag, message) |
Logs a "Critical" message using C++ style streams.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| level | The log level. |
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_CRITICAL_ERROR | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Error, tag, message) |
Logs a "Critical error" message using C++ style streams.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_CRITICAL_ERROR_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Error, tag, __VA_ARGS__) |
Logs a "Critical error" message using the printf-style formatting.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_CRITICAL_F | ( | level, | |
| tag, | |||
| ... | |||
| ) | OLP_SDK_DO_LOG_F(level, tag, __VA_ARGS__) |
Logs a "Critical" message using the printf-style formatting.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| level | The log level. |
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_CRITICAL_INFO | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Info, tag, message) |
Logs a "Critical info" message using C++ style streams.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_CRITICAL_INFO_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Info, tag, __VA_ARGS__) |
Logs a "Critical info" message using the printf-style formatting.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_CRITICAL_WARNING | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Warning, tag, message) |
Logs a "Critical warning" message using C++ style streams.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_CRITICAL_WARNING_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Warning, tag, __VA_ARGS__) |
Logs a "Critical warning" message using the printf-style formatting.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_DEBUG | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG(::olp::logging::Level::Debug, tag, message) |
Logs a "Debug" message using C++ style streams.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_DEBUG_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_F(::olp::logging::Level::Debug, tag, __VA_ARGS__) |
Logs a "Debug" message using the printf style formatting.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_ERROR | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG(::olp::logging::Level::Error, tag, message) |
Logs an "Error" message using C++ style streams.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_ERROR_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_F(::olp::logging::Level::Error, tag, __VA_ARGS__) |
Logs an "Eror" message using the printf style formatting.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_F | ( | level, | |
| tag, | |||
| ... | |||
| ) |
Logs a message using the printf style formatting.
| level | The log level. |
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_FATAL | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG_CRITICAL(::olp::logging::Level::Fatal, tag, message) |
Logs a "Fatal error" message using C++ style streams.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_FATAL_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_CRITICAL_F(::olp::logging::Level::Fatal, tag, __VA_ARGS__) |
Logs a "Critical fatal error" message using the printf-style formatting.
OLP_SDK_LOGGING_DISABLED does not disable this functionality. Additionally, it does not check to see if the tag is disabled.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_INFO | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG(::olp::logging::Level::Info, tag, message) |
Logs an "Info" message using C++ style streams.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_INFO_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_F(::olp::logging::Level::Info, tag, __VA_ARGS__) |
Logs an "Info" message using the printf style formatting.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_TRACE | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG(::olp::logging::Level::Trace, tag, message) |
Logs a "Trace" message using C++ style streams.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_TRACE_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_F(::olp::logging::Level::Trace, tag, __VA_ARGS__) |
Logs a "Trace" message using the printf style formatting.
| tag | The tag for the log component. |
| #define OLP_SDK_LOG_WARNING | ( | tag, | |
| message | |||
| ) | OLP_SDK_LOG(::olp::logging::Level::Warning, tag, message) |
Logs a "Warning" message using C++ style streams.
| tag | The tag for the log component. |
| message | The log message. |
| #define OLP_SDK_LOG_WARNING_F | ( | tag, | |
| ... | |||
| ) | OLP_SDK_LOG_F(::olp::logging::Level::Warning, tag, __VA_ARGS__) |
Logs a "Warning" message using the printf style formatting.
| tag | The tag for the log component. |