LOCAL0:
reserved for local use. LOCAL1 through LOCAL7 are
available as well.
LPR:
line printer subsystem
MAIL:
mail subsystem
NEWS: USENET news subsystem
SYSLOGBUF:
messages generated internally by syslogbufd
USER: :
generic user-level messages
UUCP:
UUCP subsystem
CONSTRUCTOR
SyslogBuf(char *ident,
FBB::Priority priority = FBB::NOTICE,
FBB::Facility facility = FBB::USER,
int option = 0):
This Syslogbuf() constructor initializes the streambuf. The
ident parameter is usually the name of the program. Its contents are
prepended to syslog messages. Use value 0 if no text needs to be prepended.
The priority parameter determines the importance of the message. By
default FBB::NOTICE is used.
The facility parameter determines the type of program doing the
logging. By default FBB::USER is used.
The option parameter may be used to specify various options (use the
binary `bitor' (`|') operator to combine options):
LOG_CONS:
write directly to system console if there is an
error while sending to system logger LOG_NDELAY:
open the connection immediately (normally, the con-
nection is opened when the first message is logged) LOG_PERROR:
print to stderr as well LOG__PID:
include PID with each message
By default no options are used.
The copy constructor is not available.
MEMBER FUNCTIONS
All members of std::streambuf are available, as FBB::SyslogBuf
inherits from this class.
Priority defaultPriority() const:
Returns the default priority. I.e., the priority that will be used for
the messages after inserting endl, unless altered by
setDefaultPriority().
Priority priority() const:
Returns the next priority. I.e., the priority that will be used for
the next message, unless altered by setPriority().
Priority setDefaultPriority(Priority priority):
Changes the default priority of the next syslog-message after
inserting std::eoln. Initially, the priority is determined as the value
passed to the constructor. The previously active default priority is returned.
Priority setPriority(Priority priority):
Changes the priority for the next syslog message (after std::eoln
has been inserted). Subsequent messages will use the default priority
again. The previously active priority setting is returned.
PROTECTED MEMBER FUNCTIONS
The following members of std::streambuf were overridden:
int overflow():
This function is called by std::ostream objects using
Syslogbuf. It calls sync(), an then it puts the next available
character into the buffer. It returns the inserted character.
int sync():
This function writes the syslog message. It is called by
overflow() when overflow() must insert EOF. The EOF insertion
is done automatically by syslogstream(3bobcat) when a newline is inserted.
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_2.02.03-x.dsc: detached signature;
bobcat_2.02.03-x.tar.gz: source archive;
bobcat_2.02.03-x_i386.changes: change log;
libbobcat1_2.02.03-x_*.deb: debian package holding the
libraries;
libbobcat1-dev_2.02.03-x_*.deb: debian package holding the
libraries, headers and manual pages;
http://sourceforge.net/projects/bobcat: public archive location;
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).