BusBoy  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
BUSBOY::Logger Class Referenceabstract

Class to extend to receive log messages. More...

#include <Logger.h>

Inheritance diagram for BUSBOY::Logger:
BUSBOY::AlgorithmContextAlgoLogger BUSBOY::ExternalContextImpl

Public Types

enum  LogLevel { INFO, ERROR, DEBUG, WARN }
 

Public Member Functions

virtual void log (LogLevel level, const std::string &msg)=0
 
virtual void log (const std::string &file, int line, LogLevel level, const std::string &msg)
 Default implementation ignores file and line. More...
 

Static Public Member Functions

static LogLevel enumFromString (std::string strLevel)
 Parses the string equivalent of the enum. More...
 
static std::string enumToString (LogLevel level)
 Returns the string equivalent of the enum. More...
 

Detailed Description

Class to extend to receive log messages.

Member Enumeration Documentation

Enumerator
INFO 
ERROR 
DEBUG 
WARN 

Member Function Documentation

Logger::LogLevel BUSBOY::Logger::enumFromString ( std::string  strLevel)
static

Parses the string equivalent of the enum.

For example: "KEY" –> KEY

std::string BUSBOY::Logger::enumToString ( Logger::LogLevel  level)
static

Returns the string equivalent of the enum.

For example: KEY –> "KEY"

virtual void BUSBOY::Logger::log ( LogLevel  level,
const std::string &  msg 
)
pure virtual
void BUSBOY::Logger::log ( const std::string &  file,
int  line,
LogLevel  level,
const std::string &  msg 
)
virtual

Default implementation ignores file and line.

Reimplemented in BUSBOY::AlgorithmContextAlgoLogger.


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

Copyright 2014 Google Inc. All rights reserved.