#include "oscl_base.h"
#include "oscl_vector.h"
#include "oscl_shared_ptr.h"
#include "oscl_base_alloc.h"
Go to the source code of this file.
Data Structures | |
class | PVLogger |
Defines | |
#define | PVLOGMSG_INST_REL 0 |
#define | PVLOGMSG_INST_PROF 1 |
#define | PVLOGMSG_INST_HLDBG 2 |
#define | PVLOGMSG_INST_MLDBG 3 |
#define | PVLOGMSG_INST_LLDBG 4 |
#define | PVLOGGER_INST_LEVEL 5 |
#define | _PVLOGGER_LOGMSG(LOGGER, LEVEL, MESSAGE) |
#define | _PVLOGGER_LOGMSG_V(LOGGER, LEVEL, MESSAGE) |
#define | _PVLOGGER_LOGBIN(LOGGER, LEVEL, MESSAGE) |
#define | _PVLOGGER_LOGBIN_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_INST_LEVEL_SUPPORT 1 |
#define | PVLOGGER_LOGMSG_PVLOGMSG_INST_REL(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_V_PVLOGMSG_INST_REL(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_PVLOGMSG_INST_REL(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_V_PVLOGMSG_INST_REL(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_PVLOGMSG_INST_PROF(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_V_PVLOGMSG_INST_PROF(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_PVLOGMSG_INST_PROF(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_V_PVLOGMSG_INST_PROF(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_PVLOGMSG_INST_HLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_V_PVLOGMSG_INST_HLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_PVLOGMSG_INST_HLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_V_PVLOGMSG_INST_HLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_PVLOGMSG_INST_MLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_V_PVLOGMSG_INST_MLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_PVLOGMSG_INST_MLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_V_PVLOGMSG_V_INST_MLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_PVLOGMSG_INST_LLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_V_PVLOGMSG_INST_LLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGMSG_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_PVLOGMSG_INST_LLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_V_PVLOGMSG_INST_LLDBG(LOGGER, LEVEL, MESSAGE) _PVLOGGER_LOGBIN_V(LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG(IL, LOGGER, LEVEL, MESSAGE) PVLOGGER_LOGMSG_ ## IL (LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGMSG_V(IL, LOGGER, LEVEL, MESSAGE) PVLOGGER_LOGMSG_V_ ## IL (LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN(IL, LOGGER, LEVEL, MESSAGE) PVLOGGER_LOGBIN_ ## IL (LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOGBIN_V(IL, LOGGER, LEVEL, MESSAGE) PVLOGGER_LOGBIN_V_ ## IL (LOGGER, LEVEL, MESSAGE) |
#define | PVLOGGER_LOG_USE_ONLY(x) x |
#define | PVLOGGER_ENABLE 1 |
Variables | |
const int32 | PVLOGGER_LEVEL_UNINTIALIZED = -1 |
const PVLogger::log_level_type | PVLOGMSG_EMERG = 0 |
const PVLogger::log_level_type | PVLOGMSG_ALERT = 1 |
const PVLogger::log_level_type | PVLOGMSG_CRIT = 2 |
const PVLogger::log_level_type | PVLOGMSG_ERR = 3 |
const PVLogger::log_level_type | PVLOGMSG_WARNING = 4 |
const PVLogger::log_level_type | PVLOGMSG_NOTICE = 5 |
const PVLogger::log_level_type | PVLOGMSG_INFO = 6 |
const PVLogger::log_level_type | PVLOGMSG_STACK_TRACE = 7 |
const PVLogger::log_level_type | PVLOGMSG_DEBUG = 8 |
const PVLogger::log_level_type | PVLOGMSG_FATAL_ERROR = PVLOGMSG_EMERG |
const PVLogger::log_level_type | PVLOGMSG_NONFATAL_ERROR = PVLOGMSG_ERR |
const PVLogger::log_level_type | PVLOGMSG_STATISTIC = PVLOGMSG_INFO |
const PVLogger::log_level_type | PVLOGMSG_VERBOSE = PVLOGMSG_DEBUG |
This is the main entry point header file for the logger library. It should be the only one users directly include.
|
Value: {\ if (LOGGER)\ {\ if (LOGGER->IsActive(LEVEL))\ {\ LOGGER->LogMsgBuffers MESSAGE;\ }\ }\ } |
|
Value: {\ if (LOGGER)\ {\ if (LOGGER->IsActive(LEVEL))\ {\ LOGGER->LogMsgBuffersV MESSAGE;\ }\ }\ } |
|
Value: {\ if (LOGGER)\ {\ if (LOGGER->IsActive(LEVEL))\ {\ LOGGER->LogMsgString MESSAGE;\ }\ }\ } |
|
Value: {\ if (LOGGER)\ {\ if (LOGGER->IsActive(LEVEL))\ {\ LOGGER->LogMsgStringV MESSAGE;\ }\ }\ } |
|
In case logging is compiled out, there is no need to compile the logger runtime code either. |
|
|
|
|
|
Used to compile in/out lines of code that are used only for PVLogger macros. This code will be removed at compile time when PVLogger is disabled, i.e. Release mode. So do not put in any code that is necessary for correct functionality of the module |
|
This is a binary API to log messages
-This message contains THREE (ptr_len, ptr) pairs. Log level of this msg is PVLOGMSG_WARNING, message id is 10. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is the text based API to log messages
")); -This message of log level PVLOGMSG_WARNING, and has a message id of 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
High Level Debug Layer This layer should contain messages that have very minimal impact on performance, but are at lower level (i.e., provide more information) than would be appropriate in a shipping product. The messages are probably used to gather information and validate proper functionality at a high level as might be appropriate for IOT, stress testing, or QA testing. |
|
Low Level Debug Layer This layer should contain messages for early functional testing. The messages are typically at a very low-level and allow testing the functionality of individual modules and components. Messages at this layer will typically have a performance impact (sometimes significant) due to the fact that they are at such a low level. |
|
Mid Level Debug Layer This layer should contain messages that are useful in the middle stages of the development cycle where major components are being integrated. The components themselves should already be well-tested so the emphasis is on interfaces between these components and integration testing. Messages at this layer may have some performance impact. |
|
Profile Layer The profile layer is used for messages and information related to messuring and reporting performance-related information. |
|
Release Layer The release layer should only be used for messages that should remain in the final release. In certain cases all messaging may be disabled depending on customer requirements. However, when allowed the release layer should contain information that will be useful diagnosing problems in a released product (perhaps after entering a diagnostic mode), but with absolutely minimal performance impact when disabled at runtime. |
|
|
|
action must be taken immediately |
|
critical conditions |
|
debug-level messages |
|
system is unusable |
|
error conditions |
|
|
|
informational |
|
|
|
normal but significant condition |
|
function enter and exit |
|
|
|
|
|
warning conditions |