FBB::SyslogBuf

libbobcat1-dev_3.01.00-x.tar.gz

2005-2012


FBB::SyslogBuf(3bobcat)

FBB::SyslogBuf(3bobcat)

libbobcat1-dev_3.01.00-x.tar.gz Stream Buffer for Syslog

2005-2012

NAME

FBB::SyslogBuf - A streambuf object inserting syslog messages

SYNOPSIS

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

DESCRIPTION

FBB::SyslogBuf objects may be used as a std::streambuf of std::ostream objects to write syslog messages using stream facilities.

NAMESPACE

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

INHERITS FROM

std::streambuf

ENUMERATIONS

The following enumerations are defined in the namespace FBB:

Priority:

The values of this enumeration match the corresponding priority LOG_xxx values used with syslog(3):

Facility:

The values of this enumeration match the corresponding facility LOG_xxx values used with syslog(3):

CONSTRUCTOR

The copy constructor is not available.

MEMBER FUNCTIONS

All members of std::streambuf are available, as FBB::SyslogBuf 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 Syslogbuf can, in accordance with Liskov's Substitution Principle, be used as a std:streambuf; but it also offers a facility for classes deriving from Syslogbuf. This facility is listed here.

EXAMPLE

See also syslogstream(3bobcat)

#include <iostream>
#include <bobcat/syslogbuf>

using namespace std;
using namespace FBB;

int main(int argc, char **argv)
{
    ostream sls(new SyslogBuf(argv[0]));

    sls << SyslogStream::debug << "Hello world" << endl;
    sls << SyslogStream::strerrno << endl;
    
    return 0;
}
    

FILES

bobcat/syslogbuf - defines the class interface

SEE ALSO

bobcat(7), openlog(3), syslog(3), syslogstream(3bobcat)

BUGS

The constructor's option parameter is an int. Because of this, int values rather than enumeration values are passed to the constructor. It is the responsibility of the programmer to pass defined option values only.

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