class LogListener

A LogListener receives messages from Log and logs them somewhere. More...

Contains pure virtuals
Definition#include <sysadm/LogListener.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

A LogListener receives messages from Log and logs them somewhere. Separate LogListeners are used by sysadmd for logging to syslog and to any other file. The "log" service uses another LogListener that sends log messages to the client.

 LogListener ()

Constructor.

LogListener ()

[virtual]

Destructor.

void  adoptFilter (LogFilter* filter)

[virtual]

Add a LogFilter. LogFilters are used by the testMessage() method for determining whether this LogListener should be called for a particular message. If testMessage() returns false for a message, handleMessage() will not be called for that message.

If there are no filters, testMessage() returns true for fatal errors, errors, warnings, and information messages.

void  removeAllFilters ()

[virtual]

Remove all of our filters. This clears the way for adding a new set of filters.

bool  testMessage (const char* module, Log::Level level)

[virtual]

Determine whether handleMessage() should be called for a particular message.

void  handleMessage (const char* module, Log::Level level, const char* format, va_list args)

[pure virtual]

Log a message. This usually involves printing it somewhere.

CollectionOf<LogFilter> _filters

[protected]


Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36.