1 2 3 4 5 6 7 8 9 10 11 12
13 /*!
14 * ======== IFilterLogger ========
15 * Interface for supporting filtering of log events by detail level.
16 *
17 * Filtering of events based on detail level is not inherently supported
18 * by the Log APIs as is filtering of events based on the diagnostics mask.
19 *
20 * Support for this type of filtering must be done by an ILogger
21 * implementation. Not all users are interested in this filtering support,
22 * however, so it is not required that all ILogger implementations support it.
23 *
24 * ILoggers which do intend to support filtering by detail level should
25 * implement this interface, which extends the ILogger interface.
26 *
27 * The {@link #setFilterLevel} and {@link #getFilterLevel} APIs support
28 * specification of a different filtering level for each of the diagnostics
29 * categories.
30 */
31 interface IFilterLogger inherits ILogger {
32
33 /*!
34 * ======== filterByLevel ========
35 * Support filtering of events by event level.
36 *
37 * To improve logging performance, this feature can be disabled by setting
38 * filterByLevel to false.
39 */
40 config Bool filterByLevel = false;
41
42 instance:
43
44 /*!
45 * ======== setFilterLevel ========
46 * Sets the level of detail that instances will log.
47 *
48 * Events with the specified level or higher will be logged, events
49 * below the specified level will be dropped.
50 *
51 * Events are filtered first by diags category, then by level. If an
52 * event's diags category is disabled in the module's diags mask, then it
53 * will be filtered out regardless of level. The event will not even be
54 * passed to the logger.
55 *
56 * This API allows for setting the filtering level for more than one
57 * diags category at a time. The mask parameter can be a single category
58 * or multiple categories combined, and the level will be set for all of
59 * those categories.
60 *
61 * @param(mask) The diags categories to set the level for
62 * @param(filterLevel) The new filtering level for the specified
63 * categories
64 */
65 Void setFilterLevel(Diags.Mask mask, Diags.EventLevel filterLevel);
66
67 /*!
68 * ======== getFilterLevel ========
69 * Returns the mask of diags categories currently set to the specified
70 * level.
71 *
72 * See '{@link #setFilterLevel}' for an explanation of level filtering.
73 */
74 Diags.Mask getFilterLevel(Diags.EventLevel level);
75
76 }
77 78 79
80