Classes | Public Types | Public Member Functions | Public Attributes | List of all members
gazebo::common::Logger Class Reference

Terminal logger. More...

#include <Console.hh>

Inheritance diagram for gazebo::common::Logger:
Inheritance graph
[legend]

Classes

class  Buffer
 String buffer for the base logger. More...
 

Public Types

enum  LogType { STDOUT, STDERR }
 

Public Member Functions

 Logger (const std::string &_prefix, int _color, LogType _type)
 Constructor. More...
 
virtual ~Logger ()
 Destructor. More...
 
virtual Loggeroperator() ()
 Access operator. More...
 
virtual Loggeroperator() (const std::string &_file, int _line)
 Output a filename and line number, then return a reference to the logger. More...
 

Public Attributes

int color
 Color for the output. More...
 

Detailed Description

Terminal logger.

Member Enumeration Documentation

Output destination type.

Enumerator
STDOUT 

Output to stdout.

STDERR 

Output to stderr.

Constructor & Destructor Documentation

gazebo::common::Logger::Logger ( const std::string &  _prefix,
int  _color,
LogType  _type 
)

Constructor.

Parameters
[in]_prefixString to use as prefix when logging to file.
[in]_colorColor of the output stream.
[in]_typeOutput destination type (STDOUT, or STDERR)
virtual gazebo::common::Logger::~Logger ( )
virtual

Destructor.

Member Function Documentation

virtual Logger& gazebo::common::Logger::operator() ( )
virtual

Access operator.

Returns
Reference to this logger.
virtual Logger& gazebo::common::Logger::operator() ( const std::string &  _file,
int  _line 
)
virtual

Output a filename and line number, then return a reference to the logger.

Parameters
[in]_fileFilename to output.
[in]_lineLine number in the _file.
Returns
Reference to this logger.

Member Data Documentation

int gazebo::common::Logger::color

Color for the output.


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