class sys_message : public mail, public memory

This class handles the output to tty's

Inheritance:


Public Methods

void error (error_set id_num, char *text)
The function handles errors
void message (char *text)
The function handles messages
sys_message (void)
The constructor
void warning (char *text)
The function handles warnings
~sys_message (void)
The destructor

Inherited from mail:

Protected Methods

void send(const char *text)

Inherited from memory:

Public Methods

void epilog_on(void)
void operator delete (void *pointer_to_bytes, size_t size)
void* operator new (size_t size)
long status(int id)

Documentation

This class handles the output to tty's. The benefit of this class is an centralized object where the whole I/O of tty's is handled. This class is used for error handling too. If there are any redirections of output, here is the right place. In this particular case all the stuff is logged in the syslog under upsd. In the version 1.1 all the signal handler messages where moved to this object, so all syslog activities can be found here.

void message(char *text)
The function handles messages. All the messages which should go to the tty are processed with this method. The message is logged in the syslog with a preceding UPS-Information:.

Parameters:
text - is the message to be logged

void warning(char *text)
The function handles warnings. All the warnings which should go to the tty are processed with this method. The message is logged in the syslog with a preceding UPS-Warning:.

Parameters:
text - is the warning to be logged

void error(error_set id_num, char *text)
The function handles errors. All the errors which should go to the tty are processed with this method. The message given out is declared through id_num. For further information see global.hpp for the different kind of errors. Most errors lead to termination with exit -1.

Parameters:
id_num - defines the type of message to be logged
Which id's are supported is defined in global.hpp. There you will find the complete set of errors, used for this and other methods.
text - is additional information of the caller (e.g. which class and method found the error)

sys_message(void)
The constructor. Used to set up initial data and open the syslog file for upsd entries. Enables everything for logging, except LOG_DEBUG.

~sys_message(void)
The destructor. Release/Close the log file for upsd.


Direct child classes:
chain
Author:
Henry Koplien
Version:
1.1 (first release 19. November 1998, last edit 29. November 1998)

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de