SRM  v0.11.0-1
Simple Rendering Manager
SRMLog

Module for logging and debugging information. More...

Detailed Description

Module for logging and debugging information.

The SRMLog module provides functions for logging messages and debugging information with varying verbosity levels. The verbosity level can be controlled by setting the SRM_DEBUG environment variable to a non-negative integer value.

Functions

void SRMLogInit ()
 Initialize the SRMLog module. More...
 
Int32 SRMLogGetLevel ()
 Get the current verbosity level. More...
 
Int32 SRMLogEGLGetLevel ()
 
void SRMLog (const char *format,...)
 Print a general message independent of the SRM_DEBUG value. More...
 
void SRMFatal (const char *format,...)
 Report an unrecoverable error. SRM_DEBUG >= 1. More...
 
void SRMError (const char *format,...)
 Report a nonfatal error. SRM_DEBUG >= 2. More...
 
void SRMWarning (const char *format,...)
 Report messages that indicate a risk. SRM_DEBUG >= 3. More...
 
void SRMDebug (const char *format,...)
 Print debugging messages. SRM_DEBUG >= 4. More...
 

Function Documentation

◆ SRMLogInit()

void SRMLogInit ( )

Initialize the SRMLog module.

This function initializes the SRMLog module and sets the verbosity level based on the SRM_DEBUG environment variable. The verbosity levels are defined as follows:

◆ SRMLogGetLevel()

Int32 SRMLogGetLevel ( )

Get the current verbosity level.

Returns
The current verbosity level as an integer.

◆ SRMLogEGLGetLevel()

Int32 SRMLogEGLGetLevel ( )

◆ SRMLog()

void SRMLog ( const char *  format,
  ... 
)

Print a general message independent of the SRM_DEBUG value.

Parameters
formatA format string for the message.
...Additional arguments for the format string.

◆ SRMFatal()

void SRMFatal ( const char *  format,
  ... 
)

Report an unrecoverable error. SRM_DEBUG >= 1.

Parameters
formatA format string for the error message.
...Additional arguments for the format string.

◆ SRMError()

void SRMError ( const char *  format,
  ... 
)

Report a nonfatal error. SRM_DEBUG >= 2.

Parameters
formatA format string for the error message.
...Additional arguments for the format string.

◆ SRMWarning()

void SRMWarning ( const char *  format,
  ... 
)

Report messages that indicate a risk. SRM_DEBUG >= 3.

Parameters
formatA format string for the warning message.
...Additional arguments for the format string.

◆ SRMDebug()

void SRMDebug ( const char *  format,
  ... 
)

Print debugging messages. SRM_DEBUG >= 4.

Parameters
formatA format string for the debug message.
...Additional arguments for the format string.