stumpless  2.1.0
filter.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 
3 /*
4  * Copyright 2022 Joel E. Anderson
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
26 #ifndef __STUMPLESS_FILTER_H
27 # define __STUMPLESS_FILTER_H
28 
29 # include <stdbool.h>
30 # include <stumpless/config.h>
31 # include <stumpless/entry.h>
32 # include <stumpless/target.h>
33 
34 # ifdef __cplusplus
35 extern "C" {
36 # endif
37 
64 bool
66  const struct stumpless_entry *entry );
67 
68 # ifdef __cplusplus
69 } /* extern "C" */
70 # endif
71 
72 #endif /* __STUMPLESS_FILTER_H */
stumpless_mask_filter
bool stumpless_mask_filter(const struct stumpless_target *target, const struct stumpless_entry *entry)
Compares the severity of the entry to the current mask of the target, and only passes the entry if th...
stumpless_target
A target that log entries can be sent to.
Definition: target.h:136
entry.h
target.h
STUMPLESS_PUBLIC_FUNCTION
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition: config.h:31
config.h
stumpless_entry
A log entry.
Definition: entry.h:63