FBB::LogBuffer(3bobcat)

log messages stream buffer
(libbobcat-dev_4.08.03-x.tar.gz)

2005-2018

NAME

FBB::LogBuffer - std::streambuf handling log messages

SYNOPSIS

#include <bobcat/logbuffer>
Linking option: -lbobcat

DESCRIPTION

FBB::LogBuffer is a class derived from std::streambuf handling log messages. The stream to log to, timestamps and log-levels can be configured both at construction time and beyond. The FBB::LogBuffer may be used to initialize a std::ostream.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

std::streambuf

ENUMERATION

The enumeration TimeStamps is defined in the namespace FBB to be used when initializing FBB::LogBuffer objects. It has the following values:

CONSTRUCTORS

Copy and move constructors are not available.

MEMBER FUNCTIONS

All members of std::streambuf are available, as FBB::LogBuffer inherits from this class.

PROTECTED MEMBER FUNCTION

The member listed in this section implements the tasks of the comparably named virtual function in the class's private interface. This separates the redefinable interface from the user-interface. The class LogBuffer can, in accordance with Liskov's Substitution Principle, be used as a std:streambuf; but it also offers a facility for classes deriving from LogBuffer. This facility is listed here.

EXAMPLE

#include <iostream>
#include <iomanip>

#include <bobcat/log>

using namespace std;
using namespace FBB;

int main()
{
    LogBuffer buffer(cout, FBB::TIMESTAMPS);
    ostream log(&buffer);

    log << "This message is written to cout" << nl <<
           setw(16) << ' ' << "occupying multiple lines\n";
}

FILES

bobcat/logbuffer - defines the class interface

SEE ALSO

bobcat(7), log(3bobcat)

BUGS

None Reported.

DISTRIBUTION FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).