This class provides a concrete Observer that filters log records.
This class provides a concrete implementation of the Observer protocol that filters the Record and Context objects passed to its publish method based on a callback (function or functor) supplied at construction. The callback must be convertible to: ` bsl::function<bool(const Record&, const Context&)> ` If the callback returns true for the Record and Context, then they are forwarded to the publish method of an observer also supplied at construction. If the callback returns false, then the Record and Context are ignored (i.e., they are filtered out by this observer).
| Name | Description |
|---|---|
Observer | This class provides a protocol for receiving and processing log record output. |
| Name | Description |
|---|---|
RecordFilterCallback | Callback type used to filter log records by user-defined criteria. |
| Name | Description |
|---|---|
FilteringObserver [constructor] | Create a filtering observer with the specified observer and filter. |
~FilteringObserver [destructor] [virtual] | Destroy this object. |
publish | publish overloads |
releaseRecords [virtual] | Discard any shared reference to a Record object held by this observer. |
operator BloombergLP::bslmf::NestedTraitDeclaration<FilteringObserver, UsesBslmaAllocator> | Declare that this type uses a bslma allocator. |
| Name | Description |
|---|---|
publish | Bring Observer::publish overloads into scope. |