Public Member Functions | Protected Attributes

com.cosylab.logging.engine.LogMatcher Class Reference

Inheritance diagram for com.cosylab.logging.engine.LogMatcher:
com.cosylab.logging.engine.ACS.ACSLogRetrieval

List of all members.

Public Member Functions

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

Protected Attributes

volatile LogTypeHelper actualDiscardLevel = 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

LogTypeHelper com.cosylab.logging.engine.LogMatcher.getActualDiscardLevel (  ) 

Return the discard level used to filter out logs.

Returns:
The discard level in use

References com.cosylab.logging.engine.LogMatcher.actualDiscardLevel.

Referenced by com.cosylab.logging.engine.ACS.LCEngine.getActualDiscardLevel().

Audience com.cosylab.logging.engine.LogMatcher.getAudience (  ) 
Returns:
the audience

Referenced by com.cosylab.logging.engine.ACS.LCEngine.getAudience().

FiltersVector com.cosylab.logging.engine.LogMatcher.getFilters (  ) 
Returns:
the filters
final boolean com.cosylab.logging.engine.LogMatcher.match ( ILogEntry  log  ) 

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

References com.cosylab.logging.engine.LogMatcher.actualDiscardLevel, com.cosylab.logging.engine.FiltersVector.applyFilters(), com.cosylab.logging.engine.log.ILogEntry.getType(), and com.cosylab.logging.engine.audience.Audience.matches().

void com.cosylab.logging.engine.LogMatcher.setAudience ( Audience  newAudience  ) 

Set the audience

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

Referenced by com.cosylab.logging.engine.ACS.LCEngine.setAudience().

void com.cosylab.logging.engine.LogMatcher.setDiscardLevel ( LogTypeHelper  discardLevel  ) 
Parameters:
discardLevel the discardLevel to set

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

References com.cosylab.logging.engine.LogMatcher.actualDiscardLevel.

void com.cosylab.logging.engine.LogMatcher.setFilters ( FiltersVector  filters  ) 

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

Referenced by com.cosylab.logging.engine.ACS.ACSLogRetrieval.ACSLogRetrieval(), com.cosylab.logging.engine.ACS.LCEngine.addFilter(), com.cosylab.logging.engine.ACS.LCEngine.clearFilters(), and com.cosylab.logging.engine.ACS.LCEngine.setFilters().


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties