Multimedia API Reference

November 16, 2016 | 24.2.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

Detailed Description

This file defines macros that provide message logging functionality.

Macros

#define LOG_LEVEL_INFO   0
 Specifies the log level for Information messages. More...
 
#define LOG_LEVEL_ERROR   1
 Specifies the log level for Error messages. More...
 
#define LOG_LEVEL_WARN   2
 Specifies the log level for Warning messages. More...
 
#define LOG_LEVEL_DEBUG   3
 Specifies the log level for Debug messages. More...
 
#define DEFAULT_LOG_LEVEL   LOG_LEVEL_INFO
 Specifies the default log level. More...
 
#define PRINT_MSG(level, str)
 Prints log messages. More...
 
#define INFO_MSG(str)   PRINT_MSG(LOG_LEVEL_INFO, str)
 Prints a log message of level LOG_LEVEL_INFO. More...
 
#define COMP_INFO_MSG(str)   ERROR_MSG("<" << comp_name << "> " << str)
 Prints a component-specific log message of level LOG_LEVEL_INFO. More...
 
#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. More...
 
#define ERROR_MSG(str)   PRINT_MSG(LOG_LEVEL_ERROR, str)
 Prints a log message of level LOG_LEVEL_ERROR. More...
 
#define COMP_ERROR_MSG(str)   ERROR_MSG("<" << comp_name << "> " << str)
 Prints a component-specific log message of level LOG_LEVEL_ERROR. More...
 
#define CAT_ERROR_MSG(str)   ERROR_MSG("<" CAT_NAME "> " << str)
 Prints a category-specific (Component type) log message of level LOG_LEVEL_ERROR. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#define WARN_MSG(str)   PRINT_MSG(LOG_LEVEL_WARN, str)
 Prints a log message of level LOG_LEVEL_WARN. More...
 
#define COMP_WARN_MSG(str)   WARN_MSG("<" << comp_name << "> :" << str)
 Prints a component-specific log message of level LOG_LEVEL_WARN. More...
 
#define CAT_WARN_MSG(str)   WARN_MSG("<" CAT_NAME "> " << str)
 Print a category-specific (Component type) log message of level LOG_LEVEL_WARN. More...
 
#define DEBUG_MSG(str)   PRINT_MSG(LOG_LEVEL_DEBUG, str)
 Prints a log message of level LOG_LEVEL_DEBUG. More...
 
#define COMP_DEBUG_MSG(str)   DEBUG_MSG("<" << comp_name << "> :" << str)
 Prints a component-specific log message of level LOG_LEVEL_DEBUG. More...
 
#define CAT_DEBUG_MSG(str)   DEBUG_MSG("<" CAT_NAME "> " << str)
 Prints a category-specific (Component type) log message of level LOG_LEVEL_DEBUG. More...
 

Variables

int log_level
 Holds the current log level at runtime by assignment of one of the LOG_LEVEL_* values. More...
 

Macro Definition Documentation

#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 222 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 151 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 128 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 175 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 199 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 213 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 142 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 119 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 166 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 189 of file NvLogging.h.

#define DEBUG_MSG (   str)    PRINT_MSG(LOG_LEVEL_DEBUG, str)

Prints a log message of level LOG_LEVEL_DEBUG.

Definition at line 204 of file NvLogging.h.

#define DEFAULT_LOG_LEVEL   LOG_LEVEL_INFO

Specifies the default log level.

Definition at line 79 of file NvLogging.h.

#define ERROR_MSG (   str)    PRINT_MSG(LOG_LEVEL_ERROR, str)

Prints a log message of level LOG_LEVEL_ERROR.

Definition at line 133 of file NvLogging.h.

#define INFO_MSG (   str)    PRINT_MSG(LOG_LEVEL_INFO, str)

Prints a log message of level LOG_LEVEL_INFO.

Definition at line 110 of file NvLogging.h.

#define LOG_LEVEL_DEBUG   3

Specifies the log level for Debug messages.

Definition at line 68 of file NvLogging.h.

#define LOG_LEVEL_ERROR   1

Specifies the log level for Error messages.

Definition at line 60 of file NvLogging.h.

#define LOG_LEVEL_INFO   0

Specifies the log level for Information messages.

Definition at line 56 of file NvLogging.h.

#define LOG_LEVEL_WARN   2

Specifies the log level for Warning messages.

Definition at line 64 of file NvLogging.h.

#define PRINT_MSG (   level,
  str 
)
Value:
if(level <= log_level) { std::cerr << "[" #level "] (" __FILE__ ":" \
__LINE_NUM_STR__ ") " << str << std::endl; }
int log_level
Holds the current log level at runtime by assignment of one of the LOG_LEVEL_* values.

Prints log messages.

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

Parameters
[in]levelThe Log level of the message.
[in]strThe NULL-terminated char array to print.

Definition at line 104 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 157 of file NvLogging.h.

#define WARN_MSG (   str)    PRINT_MSG(LOG_LEVEL_WARN, str)

Prints a log message of level LOG_LEVEL_WARN.

Definition at line 180 of file NvLogging.h.

Variable Documentation

int log_level

Holds the current log level at runtime by assignment of one of the LOG_LEVEL_* values.