Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Debug Class Reference

Provide necessary static methods to configure debugging for the use of the ELM_DBG* macros. More...

#include <elm/log/Log.h>

Static Public Member Functions

static elm::String debugPrefixWrapped (const char *file, int line)
 Display prefix of log line, which may include the source path and line number of file, the line number of the log, both or neither. More...
 
static elm::String debugPrefix (const char *file, int line, const char *functionName="")
 
static elm::String debugPrefixFunction (const char *functionName)
 
static bool getDebugFlag ()
 Check if debugging messages are enabled. More...
 
static void setDebugFlag (bool set=true)
 Enable/Disable debugging messages. More...
 
static bool getSourceInfoFlag ()
 Check if printing source info in the prefix of logs is enabled. More...
 
static void setSourceInfoFlag (bool set=true)
 Enable/Disable printing source info in the prefix of logs. More...
 
static bool getNumberingFlag ()
 Check if the numbering of the logs is enabled. More...
 
static void setNumberingFlag (bool set=true)
 Enable/Disable numbering of the logs. More...
 
static bool getColorFlag ()
 Check if colors are enabled for the logs. More...
 
static void setColorFlag (bool set=true)
 Enable/Disable the use of colors in logs. More...
 
static int getVerboseLevel ()
 Retrieve the current verbose level. More...
 
static void setVerboseLevel (int verbose_level)
 Set the verbose level to use. More...
 
static int getSourcePathLength ()
 Retrieve the current length set for the source path in the prefix of logs. More...
 
static void setSourcePathLength (int srcpath_length)
 Set a new source path length to use in the prefix of logs. More...
 
static int getFunctionNameLength ()
 
static void setFunctionNameLength (int function_name_length)
 
static color::Color getPrefixColor ()
 Get the current color of the prefix of logs. More...
 
static void setPrefixColor (const color::Color &prefix_color)
 Set a new color for the prefix of logs. More...
 

Detailed Description

Provide necessary static methods to configure debugging for the use of the ELM_DBG* macros.

Member Function Documentation

◆ debugPrefix()

elm::String debugPrefix ( const char *  file,
int  line,
const char *  functionName = "" 
)
static

◆ debugPrefixFunction()

elm::String debugPrefixFunction ( const char *  functionName)
static

◆ getColorFlag()

static bool getColorFlag ( )
inlinestatic

Check if colors are enabled for the logs.

Returns
True if the flag is enabled

Referenced by Color::operator()().

◆ getDebugFlag()

static bool getDebugFlag ( )
inlinestatic

Check if debugging messages are enabled.

Returns
True if the flag is enabled

◆ getFunctionNameLength()

static int getFunctionNameLength ( )
inlinestatic

◆ getNumberingFlag()

static bool getNumberingFlag ( )
inlinestatic

Check if the numbering of the logs is enabled.

Returns
True if the flag is enabled

Referenced by Debug::debugPrefix(), and Debug::debugPrefixWrapped().

◆ getPrefixColor()

color::Color getPrefixColor ( )
static

Get the current color of the prefix of logs.

Returns
The current color of the prefix of logs

◆ getSourceInfoFlag()

static bool getSourceInfoFlag ( )
inlinestatic

Check if printing source info in the prefix of logs is enabled.

Returns
True if the flag is enabled

Referenced by Debug::debugPrefix(), Debug::debugPrefixFunction(), and Debug::debugPrefixWrapped().

◆ getSourcePathLength()

static int getSourcePathLength ( )
inlinestatic

Retrieve the current length set for the source path in the prefix of logs.

Returns
The current source path length in the prefix

Referenced by Debug::debugPrefixWrapped().

◆ getVerboseLevel()

static int getVerboseLevel ( )
inlinestatic

Retrieve the current verbose level.

Returns
The current verbose level

◆ setFunctionNameLength()

static void setFunctionNameLength ( int  function_name_length)
inlinestatic

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