Defines | |
#define | LOG_LEVEL_INFO 0 |
Specifies the log level for Information messages. | |
#define | LOG_LEVEL_ERROR 1 |
Specifies the log level for Error messages. | |
#define | LOG_LEVEL_WARN 2 |
Specifies the log level for Warning messages. | |
#define | LOG_LEVEL_DEBUG 3 |
Specifies the log level for Debug messages. | |
#define | DEFAULT_LOG_LEVEL LOG_LEVEL_INFO |
Specifies the default log level. | |
#define | PRINT_MSG(level, str) |
Prints log messages. | |
#define | INFO_MSG(str) PRINT_MSG(LOG_LEVEL_INFO, str) |
Prints a log message of level LOG_LEVEL_INFO . | |
#define | COMP_INFO_MSG(str) ERROR_MSG("<" << comp_name << "> " << str) |
Prints a component-specific log message of level LOG_LEVEL_INFO . | |
#define | CAT_INFO_MSG(str) ERROR_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) system error log message of level LOG_LEVEL_INFO . | |
#define | ERROR_MSG(str) PRINT_MSG(LOG_LEVEL_ERROR, str) |
Prints a log message of level LOG_LEVEL_ERROR . | |
#define | COMP_ERROR_MSG(str) ERROR_MSG("<" << comp_name << "> " << str) |
Prints a component-specific log message of level LOG_LEVEL_ERROR . | |
#define | CAT_ERROR_MSG(str) ERROR_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) log message of level LOG_LEVEL_ERROR . | |
#define | SYS_ERROR_MSG(str) ERROR_MSG(str << ": " << strerror(errno)) |
Prints a system error log message of level LOG_LEVEL_ERROR with the string description of the errno value appended. | |
#define | COMP_SYS_ERROR_MSG(str) SYS_ERROR_MSG("<" << comp_name << "> " << str) |
Prints a component-specific system error log message of level LOG_LEVEL_ERROR . | |
#define | CAT_SYS_ERROR_MSG(str) SYS_ERROR_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) system error log message of level LOG_LEVEL_ERROR . | |
#define | WARN_MSG(str) PRINT_MSG(LOG_LEVEL_WARN, str) |
Prints a log message of level LOG_LEVEL_WARN . | |
#define | COMP_WARN_MSG(str) WARN_MSG("<" << comp_name << "> :" << str) |
Prints a component-specific log message of level LOG_LEVEL_WARN . | |
#define | CAT_WARN_MSG(str) WARN_MSG("<" CAT_NAME "> " << str) |
Print a category-specific (Component type) log message of level LOG_LEVEL_WARN . | |
#define | DEBUG_MSG(str) PRINT_MSG(LOG_LEVEL_DEBUG, str) |
Prints a log message of level LOG_LEVEL_DEBUG . | |
#define | COMP_DEBUG_MSG(str) DEBUG_MSG("<" << comp_name << "> :" << str) |
Prints a component-specific log message of level LOG_LEVEL_DEBUG . | |
#define | CAT_DEBUG_MSG(str) DEBUG_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) log message of level LOG_LEVEL_DEBUG . | |
Variables | |
int | log_level |
Holds the current log level at runtime by assignment of one of the LOG_LEVEL_* values. |
#define CAT_DEBUG_MSG | ( | str | ) | DEBUG_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) log message of level LOG_LEVEL_DEBUG
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <cat_name> <message_content>
Definition at line 221 of file NvLogging.h.
#define CAT_ERROR_MSG | ( | str | ) | ERROR_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) log message of level LOG_LEVEL_ERROR
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <cat_name> <message_content>
Definition at line 150 of file NvLogging.h.
#define CAT_INFO_MSG | ( | str | ) | ERROR_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) system error log message of level LOG_LEVEL_INFO
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE: LINE_NUM) <cat_name> <message_content>
Definition at line 127 of file NvLogging.h.
#define CAT_SYS_ERROR_MSG | ( | str | ) | SYS_ERROR_MSG("<" CAT_NAME "> " << str) |
Prints a category-specific (Component type) system error log message of level LOG_LEVEL_ERROR
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <cat_name> <message_content>
Definition at line 174 of file NvLogging.h.
#define CAT_WARN_MSG | ( | str | ) | WARN_MSG("<" CAT_NAME "> " << str) |
Print a category-specific (Component type) log message of level LOG_LEVEL_WARN
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <cat_name> <message_content>
Definition at line 198 of file NvLogging.h.
#define COMP_DEBUG_MSG | ( | str | ) | DEBUG_MSG("<" << comp_name << "> :" << str) |
Prints a component-specific log message of level LOG_LEVEL_DEBUG
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <comp_name> <message_content>
Definition at line 212 of file NvLogging.h.
#define COMP_ERROR_MSG | ( | str | ) | ERROR_MSG("<" << comp_name << "> " << str) |
Prints a component-specific log message of level LOG_LEVEL_ERROR
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <comp_name> <message_content>
Definition at line 141 of file NvLogging.h.
#define COMP_INFO_MSG | ( | str | ) | ERROR_MSG("<" << comp_name << "> " << str) |
Prints a component-specific log message of level LOG_LEVEL_INFO
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE: LINE_NUM) <comp_name> <message_content>
Definition at line 118 of file NvLogging.h.
#define COMP_SYS_ERROR_MSG | ( | str | ) | SYS_ERROR_MSG("<" << comp_name << "> " << str) |
Prints a component-specific system error log message of level LOG_LEVEL_ERROR
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <comp_name> <message_content>
Definition at line 165 of file NvLogging.h.
#define COMP_WARN_MSG | ( | str | ) | WARN_MSG("<" << comp_name << "> :" << str) |
Prints a component-specific log message of level LOG_LEVEL_WARN
.
This is used by the components internally and should not be used by the application.
Messages are in the following form: [LEVEL] (FILE:LINE_NUM) <comp_name> <message_content>
Definition at line 188 of file NvLogging.h.
#define DEBUG_MSG | ( | str | ) | PRINT_MSG(LOG_LEVEL_DEBUG, str) |
#define DEFAULT_LOG_LEVEL LOG_LEVEL_INFO |
#define ERROR_MSG | ( | str | ) | PRINT_MSG(LOG_LEVEL_ERROR, str) |
#define INFO_MSG | ( | str | ) | PRINT_MSG(LOG_LEVEL_INFO, str) |
#define LOG_LEVEL_DEBUG 3 |
#define LOG_LEVEL_ERROR 1 |
#define LOG_LEVEL_INFO 0 |
#define LOG_LEVEL_WARN 2 |
#define PRINT_MSG | ( | level, | |||
str | ) |
Value:
if(level <= log_level) { std::cerr << "[" #level "] (" __FILE__ ":" \ __LINE_NUM_STR__ ") " << str << std::endl; }
Prints a log message only if the current log_level
is greater than or equal to the level of the message.
Messages are in the following form: [LEVEL] (FILE: LINE_NUM) Message
[in] | level | The Log level of the message. |
[in] | str | The NULL-terminated char array to print. |
Definition at line 103 of file NvLogging.h.
#define SYS_ERROR_MSG | ( | str | ) | ERROR_MSG(str << ": " << strerror(errno)) |
Prints a system error log message of level LOG_LEVEL_ERROR
with the string description of the errno value appended.
Definition at line 156 of file NvLogging.h.
#define WARN_MSG | ( | str | ) | PRINT_MSG(LOG_LEVEL_WARN, str) |
int log_level |
Holds the current log level at runtime by assignment of one of the LOG_LEVEL_*
values.
Definition at line 31 of file NvLogging.cpp.