stumpless 2.2.0
Loading...
Searching...
No Matches
filter.h File Reference

Filters that can be used to control which entries are sent to targets at runtime. More...

Go to the source code of this file.

Functions

STUMPLESS_PUBLIC_FUNCTION 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 the mask bit corresponding to the severity is set.
 

Detailed Description

Filters that can be used to control which entries are sent to targets at runtime.

Since
release v2.1.0

Function Documentation

◆ stumpless_mask_filter()

STUMPLESS_PUBLIC_FUNCTION 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 the mask bit corresponding to the severity is set.

Thread Safety: MT-Safe This function is thread safe. A mutex is used to coordinate changes to the target while it is being read.

Async Signal Safety: AS-Unsafe lock This function is not safe to call from signal handlers due to the use of a non-reentrant lock to coordinate the read of the target.

Async Cancel Safety: AC-Unsafe lock This function is not safe to call from threads that may be asynchronously cancelled, due to the use of a lock that could be left locked..

Since
release v2.1.0
Parameters
targetThe target that the entry will be sent to if it passes.
entryThe entry that is being submitted to the target.
Returns
true if the severity of the entry is set in the target's mask, false otherwise.
Examples
filter_example.c.