RAUL  0.8.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
Raul::LogBuffer Class Reference

Buffer for (possibly coloured) log printing. More...

#include <log.hpp>

Inherits std::streambuf.

Public Types

enum  Colour {
  DEFAULT = 0 , RED = 31 , GREEN , YELLOW ,
  BLUE , MAGENTA , CYAN , WHITE
}
 

Public Member Functions

 LogBuffer (const char *prefix="", Colour colour=DEFAULT)
 
std::string colour (Colour c)
 Change the colour of the output, e.g. More...
 
std::string plain ()
 Reset the colour of the output, e.g. More...
 

Protected Member Functions

int_type overflow (int_type c)
 
int sync ()
 

Detailed Description

Buffer for (possibly coloured) log printing.

Member Function Documentation

◆ colour()

std::string Raul::LogBuffer::colour ( Colour  c)

Change the colour of the output, e.g.

out << colour(RED) << "red" << endl;

◆ plain()

std::string Raul::LogBuffer::plain ( )

Reset the colour of the output, e.g.

out << plain() << "plain" << endl;


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