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

Priority value (PRIVAL) represents both the Facility and Severity values. More...

Go to the source code of this file.

Functions

STUMPLESS_PUBLIC_FUNCTION int stumpless_prival_from_string (const char *string)
 Extract PRIVAL number (Facility and Severity) from the given string with the direct number or with two names divided with a period in the order: facility first, then severity ("<facility_descr>.<severity_descr>").
 

Detailed Description

Priority value (PRIVAL) represents both the Facility and Severity values.

Since
release v2.2.0

Function Documentation

◆ stumpless_prival_from_string()

STUMPLESS_PUBLIC_FUNCTION int stumpless_prival_from_string ( const char * string)

Extract PRIVAL number (Facility and Severity) from the given string with the direct number or with two names divided with a period in the order: facility first, then severity ("<facility_descr>.<severity_descr>").

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.2.0
Parameters
stringThe string to extract the prival from.
Returns
the PRIVAL number used for the severity and facility values of the logged entry, in the event of an error it returns -1.