libcamgm
Enumerations | Functions
ca_mgm::logger Namespace Reference

Enumerations

enum  LogLevel {
  E_FATAL = 1, E_ERROR = 2, E_WARN = 3, E_INFO = 4,
  E_DEBUG = 5
}
 

Functions

std::string logLevelToString (LogLevel level_r)
 
std::ostream & getStream (const char *group_r, LogLevel level_r, const char *file_r, const char *func_r, const int line_r)
 
bool isEnabledFor (LogLevel level_r)
 
void setLogLevel (LogLevel level_r)
 

Enumeration Type Documentation

Definition of log levels.

See Also
getStream
Enumerator
E_FATAL 
E_ERROR 
E_WARN 
E_INFO 
E_DEBUG 

Function Documentation

std::ostream& ca_mgm::logger::getStream ( const char *  group_r,
LogLevel  level_r,
const char *  file_r,
const char *  func_r,
const int  line_r 
)

Return a log stream to write on.

The returned log stream is determined by group_r and level_r. The remaining arguments file_r, func_r and line_r are expected to denote the location in the source code that issued the message.

Note
You won't call getStream directly, but use the CA_MGM_LOGGER_MACROS.
bool ca_mgm::logger::isEnabledFor ( LogLevel  level_r)
std::string ca_mgm::logger::logLevelToString ( LogLevel  level_r)
void ca_mgm::logger::setLogLevel ( LogLevel  level_r)