stumpless_set_entry_priority

Function stumpless_set_entry_priority 

Source
pub unsafe extern "C" fn stumpless_set_entry_priority(
    entry: *mut stumpless_entry,
    facility: stumpless_facility,
    severity: stumpless_severity,
) -> *mut stumpless_entry
Expand description

Sets the facility and severity of an entry.

In versions prior to 2.0.0, the facility and severity parameters were int types instead of enums.

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

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 changes.

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 v1.6.0.

@param entry The entry to set the priority values of.

@param facility The new facility of the entry. This must be a valid value according to RFC 5424, available as STUMPLESS_FACILITY constants.

@param severity The new severity of the entry. This must be a valid value according to RFC 5424, available as STUMPLESS_SEVERITY constants.

@return The modified entry if no error is encountered. If an error is encountered, then NULL is returned and an error code is set appropriately.