HTGS  v2.0
The Hybrid Task Graph Scheduler
log_message.hpp File Reference

Provides functionality for log messaging. More...

#include <iosfwd>
#include <iostream>

Go to the source code of this file.

Classes

struct  htgs_lglog
 Log structure for processing various types of arguments for std::cout. More...
 

Macros

#define HTGS_VERBOSE   1
 Defines verbose mode.
 
#define HTGS_LG_MSG_LEVEL(msg, level)
 Prints a log message to std::cout with the specified level. More...
 
#define HTGS_LG(msg)   HTGS_LG_MSG_LEVEL(msg, 0)
 Prints a log message to std::cout with standard level If LOG_FLAG is not defined, this equates to a no op. More...
 
#define HTGS_LG_VERBOSE(msg)   HTGS_LG_MSG_LEVEL(msg, HTGS_VERBOSE)
 Prints a log message to std::cout with VERBOSE level. More...
 
#define HTGS_LOG_LEVEL   0
 Defines the debug level for printing debug messages.
 
#define HTGS_LOG_ENABLED   0
 Defines whether debug is enabled or disabled.
 

Detailed Description

Provides functionality for log messaging.

Author
Timothy Blattner
Date
Nov 16, 2015

Macro Definition Documentation

◆ HTGS_LG

#define HTGS_LG (   msg)    HTGS_LG_MSG_LEVEL(msg, 0)

Prints a log message to std::cout with standard level If LOG_FLAG is not defined, this equates to a no op.

Parameters
msgthe message
Note
#define LOG_FLAG to enable log messages

◆ HTGS_LG_MSG_LEVEL

#define HTGS_LG_MSG_LEVEL (   msg,
  level 
)
Value:
if (!HTGS_LOG_ENABLED || HTGS_LOG_LEVEL < level) {} \
else htgs_lglog() << " " << msg
#define HTGS_LOG_LEVEL
Defines the debug level for printing debug messages.
Definition: log_message.hpp:62
#define HTGS_LOG_ENABLED
Defines whether debug is enabled or disabled.
Definition: log_message.hpp:72
Log structure for processing various types of arguments for std::cout.
Definition: log_message.hpp:78

Prints a log message to std::cout with the specified level.

If the specified message level is greater than defined LOG_LEVEL or if LOG_FLAG is not defined, then this equates to a no op

Parameters
msgthe message
levelthe message level
Note
#define LOG_FLAG to enable log messages

◆ HTGS_LG_VERBOSE

#define HTGS_LG_VERBOSE (   msg)    HTGS_LG_MSG_LEVEL(msg, HTGS_VERBOSE)

Prints a log message to std::cout with VERBOSE level.

If LOG_FLAG is not defined or the LOG_LEVEL is not VERBOSE, then this equates to a no op

Parameters
msgthe message
Note
#define LOG_FLAG to enable log messages
#define LOG_LEVEL_VERBOSE to enable VERBOSE debugging