Coverage for mtools.mlogfilter.filters.base_filter : 91%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Base Filter class. All filters need to derive from it and implement their version of filterArgs, accept, and optionally skipRemaining.
filterArgs needs to be a list of tuples with 2 elements each. The first tuple element is the filter argument, e.g. --xyz. The second element of the tuple is a dictionary that gets passed to the ArgumentParser object's add_argument method. """
""" constructor. save command line arguments and set active to False by default. """
# filters need to actively set this flag to true
""" hook to setup anything necessary for the filter before actually going through logevents. overwrite in subclass if setup is required. """
""" overwrite this method in subclass and return True if the provided logevent should be accepted (causing output), or False if not. """ return True
""" overwrite this method in sublcass and return True if all lines from here to the end of the file should be rejected (no output). """ |