log.cc File Reference

#include "log.h"
Include dependency graph for log.cc:

Functions

bool logHasLevel (int level)
int getLogLevel (void)
void setLogLevel (int level)
void logMsg (CString &msg, int level, ostream &out)
void logMsg (const char *msg, int level, ostream &out)
void logInfo (CString &msg, int level, ostream &out)
void logInfo (const char *msg, int level, ostream &out)
void logWarning (CString &msg, int level, ostream &out)
void logWarning (const char *msg, int level, ostream &out)
void logError (CString &msg, int level, ostream &out)
void logError (const char *msg, int level, ostream &out)

Variables

static int logLevel = 0

Function Documentation

int getLogLevel ( void   ) 

getLogLevel () The function return the level used for logging messages.

References logLevel.

void logError ( CString msg,
int  level,
ostream &  out 
)

logError () Output the message to the stream out (default: clog) when the level is equal or larger then the logging level.The function preprends a "[ERROR] " string and ends the message with an end-of-line.

References logLevel.

Referenced by SDF3Flow::computeStorageDistributions(), mapApplicationGraphToArchitectureGraph(), FSMSADF::mapApplicationGraphToArchitectureGraph(), NoCScheduler::schedule(), and SDF3Flow::selectStorageDistribution().

void logError ( const char *  msg,
int  level,
ostream &  out 
)

logError () Output the message to the stream out (default: clog) when the level is equal or larger then the logging level.The function preprends a "[ERROR] " string and ends the message with an end-of-line.

References logLevel.

bool logHasLevel ( int  level  ) 

logHasLevel () The function returns 'true' if the current log level will log a message of the supplied level.

References logLevel.

Referenced by SDF3Flow::estimateLatencyConstraints().

void logInfo ( const char *  msg,
int  level,
ostream &  out 
)

logInfo () Output the message to the stream out (default: cerr) when the level is equal or larger then the logging level. The function preprends a "[INFO] " string and ends the message with an end-of-line.

References logLevel.

void logMsg ( const char *  msg,
int  level,
ostream &  out 
)

logMsg () Output the message to the stream out (default: cerr) when the level is equal or larger then the logging level.

References logLevel.

void logWarning ( const char *  msg,
int  level,
ostream &  out 
)

logWarning () Output the message to the stream out (default: cerr) when the level is equal or larger then the logging level. The function preprends a "[WARNING] " string and ends the message with an end-of-line.

References logLevel.

void logWarning ( CString msg,
int  level,
ostream &  out 
)

logWarning () Output the message to the stream out (default: cerr) when the level is equal or larger then the logging level. The function preprends a "[WARNING] " string and ends the message with an end-of-line.

References logLevel.

void setLogLevel ( int  level  ) 

setLogLevel () The function sets the level used for logging messages.

References logLevel.


Variable Documentation

int logLevel = 0 [static]

logLevel Global indicating the level from which messages are outputted.

Referenced by getLogLevel(), logError(), logHasLevel(), logInfo(), logMsg(), logWarning(), and setLogLevel().