Construct Filters for a Log

You can define and compose filters to form a log fetching pattern. All the filters are subclasses of FieldFilter. There are two types of filter: those that act directly on log fields, and those that connect other filters.

The following are the supported filters in FieldFilter for domain logging:

You cannot directly instantiate filters through a new operator. You must acquire them by calling methods of SUPDomainLog.

FieldFilter filter1 = domainLog.getFieldEqualityFilter(
		DOMAIN_LOG_FIELD.PACKAGE_NAME, "jdbc:1.0");

FieldFilter filter2 = domainLog.getFieldEqualityFilter(
		DOMAIN_LOG_FIELD.USER_NAME, "supAdmin");

FieldFilter andFilter = domainLog.getLogicalAndFilter(Arrays
		.asList(new FieldFilter[] { filter1, filter2 }));

FieldFilter orFilter = domainLog.getLogicalOrFilter(Arrays
		.asList(new FieldFilter[] { filter1, filter2 }));
FieldFilter notFilter = domainLog.getLogicalNotFilter(andFilter);