xlog::LogRules Class Reference

Class implementing log rules configuration directive. More...

#include <conf.h>

Inheritance diagram for xlog::LogRules:

conf::ConfRules conf::ConfBlock conf::ConfDir

List of all members.

Public Types

enum  { lrAccept = 1, lrReject = 0 }
 Type of rules. More...

Public Member Functions

 LogRules (std::string const &name, bool reloadable)
 Constructor setting directive name and reloadability.
 LogRules (LogRules const &lr)
 Copy constructor.
virtual LogRulesoperator= (LogRules const &right)
 Assignment operator.
ConfRules::Rule const * match (LogLevel const &level) const
 Returns the first rule that matches the given log level.

Protected Member Functions

virtual bool add (conf::Conf &conf, conf::Conf &new_conf)
 Adds directives to a Conf object.


Detailed Description

This class implements the log rules configuration directive, that may be used by log modules as a way to determine whether to log a message based on its log level.

Member Enumeration Documentation

anonymous enum

Enumerator:
lrAccept  Accept the message.
lrReject  Reject the message.


Member Function Documentation

ConfRules::Rule const* xlog::LogRules::match ( LogLevel const &  level  )  const

Returns the first rule that matches a given log level.

Parameters:
[in] level The log level.
Returns:
A pointer to the first ConfRules::Rule object that matches the object, or 0 if none matched.

virtual bool xlog::LogRules::add ( conf::Conf conf,
conf::Conf new_conf 
) [protected, virtual]

This function must be overriden in derived classes to add directives to the given Conf object.

Parameters:
conf The Conf object that called the ConfBlock::begin() function. DO NOT add directives to this object! ;)
new_conf The Conf object to which you must add the directives.
Returns:
true if initialization went well. Else it returns false and an error message should have been logged through conf.error().

Implements conf::ConfBlock.


The documentation for this class was generated from the following file:
Generated on Fri Apr 18 22:03:29 2008 for Epona API by  doxygen 1.5.3