Ignition Common

API Reference

3.9.0

Terminal logger. More...

#include <Console.hh>

Classes

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

Public Types

enum  LogType { STDOUT, STDERR }
 Output destination type. More...
 

Public Member Functions

 Logger (const std::string &_prefix, const int _color, const LogType _type, const int _verbosity)
 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 Member Functions inherited from ostream
ostream (T... args)
 
~ostream (T... args)
 
bad (T... args)
 
clear (T... args)
 
copyfmt (T... args)
 
eof (T... args)
 
exceptions (T... args)
 
fail (T... args)
 
fill (T... args)
 
flags (T... args)
 
flush (T... args)
 
getloc (T... args)
 
good (T... args)
 
imbue (T... args)
 
init (T... args)
 
iword (T... args)
 
move (T... args)
 
narrow (T... args)
 
operator bool (T... args)
 
operator! (T... args)
 
operator<< (T... args)
 
precision (T... args)
 
put (T... args)
 
pword (T... args)
 
rdbuf (T... args)
 
rdstate (T... args)
 
register_callback (T... args)
 
seekp (T... args)
 
set_rdbuf (T... args)
 
setf (T... args)
 
setstate (T... args)
 
swap (T... args)
 
sync_with_stdio (T... args)
 
tellp (T... args)
 
tie (T... args)
 
unsetf (T... args)
 
widen (T... args)
 
width (T... args)
 
write (T... args)
 
xalloc (T... args)
 
- Public Member Functions inherited from basic_ostream< char >
basic_ostream (T... args)
 
~basic_ostream (T... args)
 
bad (T... args)
 
clear (T... args)
 
copyfmt (T... args)
 
eof (T... args)
 
exceptions (T... args)
 
fail (T... args)
 
fill (T... args)
 
flags (T... args)
 
flush (T... args)
 
getloc (T... args)
 
good (T... args)
 
imbue (T... args)
 
init (T... args)
 
iword (T... args)
 
move (T... args)
 
narrow (T... args)
 
operator bool (T... args)
 
operator! (T... args)
 
operator<< (T... args)
 
precision (T... args)
 
put (T... args)
 
pword (T... args)
 
rdbuf (T... args)
 
rdstate (T... args)
 
register_callback (T... args)
 
seekp (T... args)
 
set_rdbuf (T... args)
 
setf (T... args)
 
setstate (T... args)
 
swap (T... args)
 
sync_with_stdio (T... args)
 
tellp (T... args)
 
tie (T... args)
 
unsetf (T... args)
 
widen (T... args)
 
width (T... args)
 
write (T... args)
 
xalloc (T... args)
 
- Public Member Functions inherited from basic_ios< char >
basic_ios (T... args)
 
~basic_ios (T... args)
 
bad (T... args)
 
clear (T... args)
 
copyfmt (T... args)
 
eof (T... args)
 
exceptions (T... args)
 
fail (T... args)
 
fill (T... args)
 
flags (T... args)
 
getloc (T... args)
 
good (T... args)
 
imbue (T... args)
 
init (T... args)
 
iword (T... args)
 
move (T... args)
 
narrow (T... args)
 
operator bool (T... args)
 
operator! (T... args)
 
precision (T... args)
 
pword (T... args)
 
rdbuf (T... args)
 
rdstate (T... args)
 
register_callback (T... args)
 
set_rdbuf (T... args)
 
setf (T... args)
 
setstate (T... args)
 
swap (T... args)
 
sync_with_stdio (T... args)
 
tie (T... args)
 
unsetf (T... args)
 
widen (T... args)
 
width (T... args)
 
xalloc (T... args)
 
- Public Member Functions inherited from ios_base
ios_base (T... args)
 
~ios_base (T... args)
 
flags (T... args)
 
getloc (T... args)
 
imbue (T... args)
 
iword (T... args)
 
precision (T... args)
 
pword (T... args)
 
register_callback (T... args)
 
setf (T... args)
 
sync_with_stdio (T... args)
 
unsetf (T... args)
 
width (T... args)
 
xalloc (T... args)
 

Detailed Description

Terminal logger.

Member Enumeration Documentation

◆ LogType

enum LogType

Output destination type.

Enumerator
STDOUT 

Output to stdout.

STDERR 

Output to stderr.

Constructor & Destructor Documentation

◆ Logger()

Logger ( const std::string _prefix,
const int  _color,
const LogType  _type,
const int  _verbosity 
)

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)
[in]_verbosityVerbosity level.

◆ ~Logger()

virtual ~Logger ( )
virtual

Destructor.

Member Function Documentation

◆ operator()() [1/2]

virtual Logger& operator() ( )
virtual

Access operator.

Returns
Reference to this logger.

◆ operator()() [2/2]

virtual 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.

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