Base-class for filters. Filters allow full user-defined control over whether or not a message should print. The ROS_X_FILTER... macros provide the filtering functionality. More...
#include <console.h>
Public Member Functions | |
virtual bool | isEnabled () |
Returns whether or not the log statement should be printed. Called before the log arguments are evaluated and the message is formatted. More... | |
virtual bool | isEnabled (FilterParams &) |
Returns whether or not the log statement should be printed. Called once the message has been formatted, and allows you to change the message, logger and severity level if necessary. More... | |
virtual | ~FilterBase () |
Base-class for filters. Filters allow full user-defined control over whether or not a message should print. The ROS_X_FILTER... macros provide the filtering functionality.
Filters get a chance to veto the message from printing at two times: first before the message arguments are evaluated and the message is formatted, and then once the message is formatted before it is printed. It is also possible to change the message, logger and severity level at this stage (see the FilterParams struct for more details).
When a ROS_X_FILTER... macro is called, here is the high-level view of how it uses the filter passed in:
if (<logging level is enabled> && filter->isEnabled()) { <format message> <fill out FilterParams> if (filter->isEnabled(params)) { <print message> } }
|
inlinevirtual |
|
inlinevirtual |
Returns whether or not the log statement should be printed. Called before the log arguments are evaluated and the message is formatted.
Reimplemented in BasicFilter.
|
inlinevirtual |
Returns whether or not the log statement should be printed. Called once the message has been formatted, and allows you to change the message, logger and severity level if necessary.
Reimplemented in ChangeFilter, and AdvancedFilter.