MySQL 9.1.0
Source Code Documentation
|
Go to the source code of this file.
Classes | |
class | log_builtins_filter_imp |
class | log_builtins_filter_debug_imp |
Functions | |
int | log_builtins_filter_exit () |
Deinitialize filtering engine. More... | |
int | log_builtins_filter_init () |
Initialize filtering engine. More... | |
int | log_builtins_filter_run (log_filter_ruleset *ruleset, log_line *ll) |
Apply all matching rules from a filter rule set to a given log line. More... | |
int | log_builtins_filter_update_verbosity (int verbosity) |
This is part of the 5.7 emulation: If –log_error_verbosity is changed, we generate an artificial filter rule from it here. More... | |
int | log_builtins_filter_parse_suppression_list (char *list, bool update) |
@global.log_error_suppression_list accepts a comma-separated list of error-codes that should not be included in the error-log. More... | |
int log_builtins_filter_exit | ( | ) |
Deinitialize filtering engine.
0 | Success! |
-1 | De-initialize? Filter wasn't even initialized! |
int log_builtins_filter_init | ( | ) |
Initialize filtering engine.
We need to do this early, before the component system is up.
We need to do this early, before the component system is up.
0 | Success! |
-1 | Couldn't initialize ruleset |
-2 | Filter was already initialized? |
int log_builtins_filter_parse_suppression_list | ( | char * | list, |
bool | update | ||
) |
@global.log_error_suppression_list accepts a comma-separated list of error-codes that should not be included in the error-log.
Events with a severity of System or Error can not be filtered in this way and will always be forwarded to the log-sinks.
This provides simple filtering for cases where the flexibility of the loadable filter-language is not needed. (The same engine is used however, just with a more limited interface.)
For this filtering to be active, @global.log_error_services has to feature "log_filter_internal", as it does by default. When that is the case, one or both of log_error_verbosity and this variable may be used. Only one of "log_filter_internal" and "log_filter_dragnet" should be used at a time.
The semantics follow that of our system variables; that is to say, when called with update==false, the function acts as a check-function that validates the entire list given to it; when called with update==true, it creates filter-rules from the list items. This way, we either create all rules, or no rules, rather than ending up with an incomplete rule-set when we encounter a problem in the input.
The return value encodes the location in the argument where the failure occurred, like so:
list | list of error-codes that should not appear in the error-log |
update | false: verify list only true: create filtering rules from suppression list |
0 | success |
!0 | failure (see above) |
int log_builtins_filter_run | ( | log_filter_ruleset * | ruleset, |
log_line * | ll | ||
) |
Apply all matching rules from a filter rule set to a given log line.
ruleset | rule-set to apply |
ll | the current log line |
int | number of matched rules |
int log_builtins_filter_update_verbosity | ( | int | verbosity | ) |
This is part of the 5.7 emulation: If –log_error_verbosity is changed, we generate an artificial filter rule from it here.
For this filtering to be active, @global.log_error_services has to feature "log_filter_internal", as it does by default. When that is the case, one or both of log_error_verbosity and log_error_suppression_list (see below) may be used. Only one of "log_filter_internal" and "log_filter_dragnet" should be used at a time.
verbosity | log_error_verbosity style, range(1,3) 1:errors, 2:+=warnings, 3:+=notes |
0 | success |
!0 | failure |