NVIDIA DeepStream SDK API Reference

9.2 Release
PrettyLogger Class Reference

Detailed Description

Public Member Functions

 PrettyLogger (LogLevel level=LogLevel::ERROR)
 
void setLogLevel (const std::string &level_str)
 Set the logging level. More...
 
void setLogLevel (LogLevel level)
 Set the logging level using enum. More...
 
void reset ()
 
void warning (const std::string &message)
 Display a warning message. More...
 
void error (const std::string &message)
 Display an error message. More...
 
void info (const std::string &message)
 Display an informational message. More...
 
void persistent_info (const std::string &message)
 Prints a persistent information message that is always displayed. More...
 
void processStart (const std::string &process, int frameNum, bool isMainProcess=false, const std::string &additionalInfo="")
 Mark the start of a process for timing and logging. More...
 
void processComplete (const std::string &process, int frameNum, bool success=true, bool isMainProcess=false, const std::string &additionalInfo="")
 Mark the completion of a process and display timing information. More...
 
 PrettyLogger (LogLevel level=LogLevel::ERROR)
 
void setLogLevel (const std::string &level_str)
 Set the logging level. More...
 
void setLogLevel (LogLevel level)
 Set the logging level using enum. More...
 
void reset ()
 
void warning (const std::string &message)
 Display a warning message. More...
 
void error (const std::string &message)
 Display an error message. More...
 
void info (const std::string &message)
 Display an informational message. More...
 
void persistent_info (const std::string &message)
 Prints a persistent information message that is always displayed. More...
 
void processStart (const std::string &process, int frameNum, bool isMainProcess=false, const std::string &additionalInfo="")
 Mark the start of a process for timing and logging. More...
 
void processComplete (const std::string &process, int frameNum, bool success=true, bool isMainProcess=false, const std::string &additionalInfo="")
 Mark the completion of a process and display timing information. More...
 

Constructor & Destructor Documentation

◆ PrettyLogger() [1/2]

PrettyLogger::PrettyLogger ( LogLevel  level = LogLevel::ERROR)
inline

◆ PrettyLogger() [2/2]

PrettyLogger::PrettyLogger ( LogLevel  level = LogLevel::ERROR)
inline

Member Function Documentation

◆ error() [1/2]

void PrettyLogger::error ( const std::string &  message)
inline

Display an error message.

Errors are always displayed regardless of log level.

Parameters
[in]messageThe error message to display

Definition at line 323 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_ERROR, ANSI_COLOR_RESET, and INFO.

◆ error() [2/2]

void PrettyLogger::error ( const std::string &  message)
inline

Display an error message.

Errors are always displayed regardless of log level.

Parameters
[in]messageThe error message to display

Definition at line 323 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_ERROR, ANSI_COLOR_RESET, and INFO.

◆ info() [1/2]

void PrettyLogger::info ( const std::string &  message)
inline

Display an informational message.

Info messages are displayed only when log level is INFO.

Parameters
[in]messageThe informational message to display

Definition at line 346 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_INFO2, ANSI_COLOR_RESET, and INFO.

Referenced by persistent_info().

◆ info() [2/2]

void PrettyLogger::info ( const std::string &  message)
inline

Display an informational message.

Info messages are displayed only when log level is INFO.

Parameters
[in]messageThe informational message to display

Definition at line 346 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_INFO2, ANSI_COLOR_RESET, and INFO.

◆ persistent_info() [1/2]

void PrettyLogger::persistent_info ( const std::string &  message)
inline

Prints a persistent information message that is always displayed.

This function provides critical messages that should always be visible regardless of the logger's log level. When log level is INFO, it uses proper formatting. Otherwise, it prints directly without formatting.

Parameters
[in]messageThe message to be displayed

Definition at line 383 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References INFO, and info().

◆ persistent_info() [2/2]

void PrettyLogger::persistent_info ( const std::string &  message)
inline

Prints a persistent information message that is always displayed.

This function provides critical messages that should always be visible regardless of the logger's log level. When log level is INFO, it uses proper formatting. Otherwise, it prints directly without formatting.

Parameters
[in]messageThe message to be displayed

Definition at line 383 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References INFO, and info().

◆ processComplete() [1/2]

void PrettyLogger::processComplete ( const std::string &  process,
int  frameNum,
bool  success = true,
bool  isMainProcess = false,
const std::string &  additionalInfo = "" 
)
inline

Mark the completion of a process and display timing information.

Process completion is displayed only when log level is INFO.

Parameters
[in]processThe name of the process
[in]frameNumThe frame number
[in]successWhether the process completed successfully
[in]isMainProcessWhether this is the main process
[in]additionalInfoOptional additional information to display

Definition at line 510 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_ERROR, ANSI_COLOR_INFO2, ANSI_COLOR_RESET, ANSI_COLOR_SUCCESS, and INFO.

◆ processComplete() [2/2]

void PrettyLogger::processComplete ( const std::string &  process,
int  frameNum,
bool  success = true,
bool  isMainProcess = false,
const std::string &  additionalInfo = "" 
)
inline

Mark the completion of a process and display timing information.

Process completion is displayed only when log level is INFO.

Parameters
[in]processThe name of the process
[in]frameNumThe frame number
[in]successWhether the process completed successfully
[in]isMainProcessWhether this is the main process
[in]additionalInfoOptional additional information to display

Definition at line 510 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_ERROR, ANSI_COLOR_INFO2, ANSI_COLOR_RESET, ANSI_COLOR_SUCCESS, and INFO.

◆ processStart() [1/2]

void PrettyLogger::processStart ( const std::string &  process,
int  frameNum,
bool  isMainProcess = false,
const std::string &  additionalInfo = "" 
)
inline

Mark the start of a process for timing and logging.

Process timing is displayed only when log level is INFO.

Parameters
[in]processThe name of the process
[in]frameNumThe frame number (-1 for non-frame-specific processes)
[in]isMainProcessWhether this is the main process
[in]additionalInfoOptional additional information to display

Definition at line 404 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_INFO2, ANSI_COLOR_RESET, and INFO.

◆ processStart() [2/2]

void PrettyLogger::processStart ( const std::string &  process,
int  frameNum,
bool  isMainProcess = false,
const std::string &  additionalInfo = "" 
)
inline

Mark the start of a process for timing and logging.

Process timing is displayed only when log level is INFO.

Parameters
[in]processThe name of the process
[in]frameNumThe frame number (-1 for non-frame-specific processes)
[in]isMainProcessWhether this is the main process
[in]additionalInfoOptional additional information to display

Definition at line 404 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_INFO2, ANSI_COLOR_RESET, and INFO.

◆ reset() [1/2]

void PrettyLogger::reset ( )
inline

◆ reset() [2/2]

void PrettyLogger::reset ( )
inline

◆ setLogLevel() [1/4]

void PrettyLogger::setLogLevel ( const std::string &  level_str)
inline

Set the logging level.

Parameters
[in]level_strString representation of log level (info, warn, error)

Definition at line 267 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

◆ setLogLevel() [2/4]

void PrettyLogger::setLogLevel ( const std::string &  level_str)
inline

Set the logging level.

Parameters
[in]level_strString representation of log level (info, warn, error)

Definition at line 267 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

◆ setLogLevel() [3/4]

void PrettyLogger::setLogLevel ( LogLevel  level)
inline

Set the logging level using enum.

Parameters
[in]levelLogLevel enum value

Definition at line 276 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

◆ setLogLevel() [4/4]

void PrettyLogger::setLogLevel ( LogLevel  level)
inline

Set the logging level using enum.

Parameters
[in]levelLogLevel enum value

Definition at line 276 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

◆ warning() [1/2]

void PrettyLogger::warning ( const std::string &  message)
inline

Display a warning message.

Warnings are displayed when log level is WARN or INFO.

Parameters
[in]messageThe warning message to display

Definition at line 296 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_RESET, ANSI_COLOR_WARNING, ERROR, and INFO.

◆ warning() [2/2]

void PrettyLogger::warning ( const std::string &  message)
inline

Display a warning message.

Warnings are displayed when log level is WARN or INFO.

Parameters
[in]messageThe warning message to display

Definition at line 296 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/utils/log_utils.h.

References ANSI_COLOR_RESET, ANSI_COLOR_WARNING, ERROR, and INFO.


The documentation for this class was generated from the following file: