class LogFilter

LogFilter filters a message based on level and module. More...

Definition#include <sysadm/LogFilter.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

LogFilter filters a message based on level and module. A LogFilter has one level and a list of modules. testMessage() returns true if "level" is set in the level mask for this filter, and if module is in our list of modules. An empty list of modules means that messages from all modules are logged.

 LogFilter ()

Constructor.

LogFilter ()

[virtual]

Destructor.

void  levelOn (int level)

[virtual]

Turn a level on for the purposes of this filter. "level" can be a single Log::Level or a combination (via bitwise or).

void  levelOff (int level)

[virtual]

Turn a level off for the purposes of this filter.

void  addModule (const String& module)

[virtual]

Add a module to the list of modules for this filter. If our list of modules is non-empty, then only messages from one of the modules in our list will be logged.

void  addModuleList (const String& moduleList)

[virtual]

Add each module in a comma-separated list of modules to our list.

void  removeModule (const String& module)

[virtual]

Remove a module from our list of modules.

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

[virtual]

Test whether a message should be logged, using our level and module list as the criteria. "module" is not a String to avoid an unnecessary strdup().

int _levelMask

[protected]

CollectionOf<String> _modules

[protected]


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