FBB::Log(3bobcat)

Log messages
(libbobcat-dev_4.08.03-x.tar.gz)

2005-2018

NAME

FBB::Log - std::ostream handling log messages

SYNOPSIS

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

DESCRIPTION

The class FBB::Log is an std::ostream initialized with a FBB::LogBuffer. It is used to send log-messages to the (r)syslog stream. Refer to the logbuffer(3bobcat) man-page for details about this process.

NAMESPACE

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

INHERITS FROM

std::ostream

ENUMERATIONS

The enumeration TimeStamps is defined in the namespace FBB, primarily for initializing FBB::LogBuffer objects. It is used with FBB::Log members as well. It has the following values:

The enumeration LogManipulator is used to handle special or exceptional situations through manipulators. It is defined in the namespace FBB and has the following two values:

CONSTRUCTORS

The copy constructor is not available.

MEMBER FUNCTIONS

All members of std::ostream are available, as FBB::Log inherits from this class.

STATIC MEMBERS

OVERLOADED OPERATOR

The following overloaded operator is defined outside of the FBB namespace. It may be used to insert an FBB::LogManipulator into an FBB::Log object. If the overloaded operator is used in combination with another type of object it performs no actions.

EXAMPLE

#include <iostream>
#include <iomanip>

#include <bobcat/log>

using namespace std;
using namespace FBB;

int main()
{
//    Log &log = Log::initialize("&1");
    Log log;
    log.open("/tmp/out");

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

    log.off();
    log << "This message is not shown\n";
    log.setLevel(0);
    log << "This message is shown again\n";
}


FILES

bobcat/log - defines the class interface

SEE ALSO

bobcat(7), exception(3bobcat), level(3bobcat), logbuffer(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).