Project: engagement_recognition

License: BSD

Dependencies:

Used by: None

All Packages

Loggable Class Reference

#include <loggable.h>

Inheritance diagram for Loggable:

List of all members.

Public Member Functions

void blue (const char *str,...)
void cyan (const char *str,...)
void debug (int level, const char *str,...)
void error (const char *str,...)
void fatal (const char *str,...)
ConsoleLoggergetLogger ()
void green (const char *str,...)
void info (const char *str,...)
 Loggable ()
void purple (const char *str,...)
void red (const char *str,...)
void setLogger (ConsoleLogger *logger)
void setLogger (ConsoleLogger *logger, const char *prefix, int color)
void setLogger (ConsoleLogger *logger, std::string prefix, int color)
void setLogger (const char *prefix, int color)
void setLogger (std::string prefix, int color)
void setLogger (ConsoleLogger *logger, const char *prefix)
void setLogger (ConsoleLogger *logger, std::string prefix)
void setLogger (const char *prefix)
void setLogger (std::string prefix)
void setLogger ()
void warn (const char *str,...)
void yellow (const char *str,...)
 ~Loggable ()

Private Attributes

ConsoleLoggerlogger_

Detailed Description

This class provides methods that will be used in classes that are loggable. Being loggable means that the class has its own ConsoleLogger and is able to use that to print output to the console.

Author:
Brett Ponsler (bponsler (at) wpi (dot) edu)

Definition at line 47 of file loggable.h.


Constructor & Destructor Documentation

Loggable::~Loggable (  ) 

Deconstructor for the Loggable class.

Definition at line 40 of file loggable.cpp.

Loggable::Loggable (  ) 

Default constructor for the Loggable class.

Definition at line 47 of file loggable.cpp.


Member Function Documentation

void Loggable::blue ( const char *  str,
  ... 
)

Log a Blue Info statement to the console.

Parameters:
str The string to log

Definition at line 231 of file loggable.cpp.

void Loggable::cyan ( const char *  str,
  ... 
)

Log a Cyan Info statement to the console.

Parameters:
str The string to log

Definition at line 257 of file loggable.cpp.

void Loggable::debug ( int  level,
const char *  str,
  ... 
)

Log a Debug statement to the console.

Parameters:
level The verbosity level for this statement
str The string to log

Definition at line 127 of file loggable.cpp.

void Loggable::error ( const char *  str,
  ... 
)

Log an Error statement to the console.

Parameters:
str The string to log

Definition at line 166 of file loggable.cpp.

void Loggable::fatal ( const char *  str,
  ... 
)

Log a Fatal statement to the console.

Parameters:
str The string to log

Definition at line 179 of file loggable.cpp.

ConsoleLogger * Loggable::getLogger (  ) 

Return the ConsoleLogger for this Loggable object.

Returns:
The ConsoleLogger

Definition at line 52 of file loggable.cpp.

void Loggable::green ( const char *  str,
  ... 
)

Log a Green Info statement to the console.

Parameters:
str The string to log

Definition at line 205 of file loggable.cpp.

void Loggable::info ( const char *  str,
  ... 
)

Log an Info statement to the console.

Parameters:
str The string to log

Definition at line 140 of file loggable.cpp.

void Loggable::purple ( const char *  str,
  ... 
)

Log a Purple Info statement to the console.

Parameters:
str The string to log

Definition at line 244 of file loggable.cpp.

void Loggable::red ( const char *  str,
  ... 
)

Log a Red Info statement to the console.

Parameters:
str The string to log

Definition at line 192 of file loggable.cpp.

void Loggable::setLogger ( ConsoleLogger logger  ) 

Set the ConsoleLogger for this Loggable object.

Parameters:
logger The base logger

Definition at line 120 of file loggable.cpp.

void Loggable::setLogger ( ConsoleLogger logger,
const char *  prefix,
int  color 
)

Set the ConsoleLogger for this Loggable object.

Parameters:
logger The base logger
prefix The prefix
color The color

Definition at line 113 of file loggable.cpp.

void Loggable::setLogger ( ConsoleLogger logger,
std::string  prefix,
int  color 
)

Set the ConsoleLogger for this Loggable object.

Parameters:
logger The base logger
prefix The prefix
color The color

Definition at line 106 of file loggable.cpp.

void Loggable::setLogger ( const char *  prefix,
int  color 
)

Set the ConsoleLogger for this Loggable object.

Parameters:
prefix The prefix
color The color

Definition at line 99 of file loggable.cpp.

void Loggable::setLogger ( std::string  prefix,
int  color 
)

Set the ConsoleLogger for this Loggable object.

Parameters:
prefix The prefix
color The color

Definition at line 92 of file loggable.cpp.

void Loggable::setLogger ( ConsoleLogger logger,
const char *  prefix 
)

Set the ConsoleLogger for this Loggable object.

Parameters:
logger The base logger
prefix The prefix

Definition at line 85 of file loggable.cpp.

void Loggable::setLogger ( ConsoleLogger logger,
std::string  prefix 
)

Set the ConsoleLogger for this Loggable object.

Parameters:
logger The base logger
prefix The prefix

Definition at line 78 of file loggable.cpp.

void Loggable::setLogger ( const char *  prefix  ) 

Set the ConsoleLogger for this Loggable object.

Parameters:
prefix The prefix

Definition at line 71 of file loggable.cpp.

void Loggable::setLogger ( std::string  prefix  ) 

Set the ConsoleLogger for this Loggable object.

Parameters:
prefix The prefix

Definition at line 64 of file loggable.cpp.

void Loggable::setLogger (  ) 

Set the ConsoleLogger for this Loggable object.

Definition at line 57 of file loggable.cpp.

void Loggable::warn ( const char *  str,
  ... 
)

Log a Warning statement to the console.

Parameters:
str The string to log

Definition at line 153 of file loggable.cpp.

void Loggable::yellow ( const char *  str,
  ... 
)

Log a Yellow Info statement to the console.

Parameters:
str The string to log

Definition at line 218 of file loggable.cpp.


Member Data Documentation

The ConsoleLogger for this class.

Reimplemented in Actor, Robot, and FileLogger.

Definition at line 51 of file loggable.h.


The documentation for this class was generated from the following files:
  • engagement_recognition/src/recognition/logger/loggable.h
  • engagement_recognition/src/recognition/logger/loggable.cpp

engagement_recognition
Author(s): Brett Ponsler (bponsler (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:35:49 2011