remotemono
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
remotemono::RMonoLogger Class Reference

#include <log.h>

Classes

struct  LogMessage
 

Public Types

enum  LogLevel {
  LOG_LEVEL_NONE = 0, LOG_LEVEL_ERROR = 10, LOG_LEVEL_WARNING = 20, LOG_LEVEL_INFO = 30,
  LOG_LEVEL_DEBUG = 40, LOG_LEVEL_VERBOSE = 50
}
 
typedef std::function< void(const LogMessage &)> LogFunction
 
typedef int LogFunctionID
 

Public Member Functions

void setLogLevel (LogLevel level)
 
LogLevel getLogLevel () const
 
const char * getLogLevelName (LogLevel level)
 
bool isLogLevelActive (LogLevel level)
 
LogFunctionID registerLogFunction (LogFunction f)
 
bool unregisterLogFunction (LogFunctionID id)
 
template<typename... Args>
void logMessageUnchecked (LogLevel level, const char *fmt, Args... args)
 
template<typename... Args>
void logMessage (LogLevel level, const char *fmt, Args... args)
 

Static Public Member Functions

static RMonoLoggergetInstance ()
 

Detailed Description

The singleton class through which RemoteMono logs its various internal operations. You can receive the messages logged by RemoteMono by registering a log function with registerLogFunction().

You can also use RMonoStdoutLogFunction::registerLogFunction() for quick and simple logging to stdout.

If you want to actually log a message, consider using one of the global RMonoLog*() functions instead of directly using this class.


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