Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::logging::engine::LogMatcher Class Reference

Inheritance diagram for com::cosylab::logging::engine::LogMatcher:

Inheritance graph
[legend]
Collaboration diagram for com::cosylab::logging::engine::LogMatcher:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void setFilters (FiltersVector filters)
void setAudience (EngineAudienceHelper newAudience)
EngineAudienceHelper getAudience ()
void setDiscardLevel (LogTypeHelper discardLevel)
FiltersVector getFilters ()
final boolean match (ILogEntry log)
LogTypeHelper getActualDiscardLevel ()

Protected Attributes

volatile LogTypeHelper actualDiscardLevel = null

Private Member Functions

boolean checkAudience (ILogEntry log)

Private Attributes

EngineAudienceHelper audience = EngineAudienceHelper.NO_AUDIENCE
FiltersVector filters = null

Detailed Description

Objects from this class checks if a log matches with the constraints.

The purpose of this object is to have a centralized way to check each log against the given set of constraints before deciding it can be injected in the system.

In particular it checks a log against the followings:

Author:
acaproni


Member Function Documentation

boolean com::cosylab::logging::engine::LogMatcher::checkAudience ILogEntry  log  )  [inline, private]
 

Check if a log matches with the audience

Parameters:
log The not null log to check
Returns:
true if the log matches with the defined audience

LogTypeHelper com::cosylab::logging::engine::LogMatcher::getActualDiscardLevel  )  [inline]
 

Return the discard level used to filter out logs.

Returns:
The discard level in use

EngineAudienceHelper com::cosylab::logging::engine::LogMatcher::getAudience  )  [inline]
 

Returns:
the audience

FiltersVector com::cosylab::logging::engine::LogMatcher::getFilters  )  [inline]
 

Returns:
the filters

final boolean com::cosylab::logging::engine::LogMatcher::match ILogEntry  log  )  [inline]
 

Check if the passed log matches with the constraints.

The log is checked in the following order:

  1. the discard level
  2. the audience
  3. the filters

Parameters:
log The not null log to check
Returns:
true if the log matches the criteria

void com::cosylab::logging::engine::LogMatcher::setAudience EngineAudienceHelper  newAudience  )  [inline]
 

Set the audience

Parameters:
newAudience The new audience as defined in log_audience IDL module
See also:
LCEngine.setFilters()

void com::cosylab::logging::engine::LogMatcher::setDiscardLevel LogTypeHelper  discardLevel  )  [inline]
 

Parameters:
discardLevel the discardLevel to set

Reimplemented in com::cosylab::logging::engine::ACS::ACSLogRetrieval.

void com::cosylab::logging::engine::LogMatcher::setFilters FiltersVector  filters  )  [inline]
 

Set the filters to apply to incoming logs before sending to the listeners

Parameters:
filters The filters to apply If null or empty the filtering is disabled


Member Data Documentation

volatile LogTypeHelper com::cosylab::logging::engine::LogMatcher::actualDiscardLevel = null [protected]
 

The discard level

EngineAudienceHelper com::cosylab::logging::engine::LogMatcher::audience = EngineAudienceHelper.NO_AUDIENCE [private]
 

The audience.

Only the logs for the defined audience will be forwarded to the listeners.

See also:
LCEngine.setFilters()

FiltersVector com::cosylab::logging::engine::LogMatcher::filters = null [private]
 

The filters to apply before publishing logs to the listeners. The filters are not applied to XML listeners. These filters are applied after the audience.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:13:06 2009 for ACS Java API by doxygen 1.3.8