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

Functions that help when using journald targets. More...

Go to the source code of this file.

Functions

STUMPLESS_PUBLIC_FUNCTION stumpless_element_namer_func_t stumpless_get_element_journald_namer (const struct stumpless_element *element)
 Gets the function used to derive the name of the field for this element when logging to journald targets.
 
STUMPLESS_PUBLIC_FUNCTION stumpless_param_namer_func_t stumpless_get_param_journald_namer (const struct stumpless_param *param)
 Gets the function used to derive the name of the field for this param when logging to journald targets.
 
STUMPLESS_PUBLIC_FUNCTION struct stumpless_elementstumpless_set_element_journald_namer (struct stumpless_element *element, stumpless_element_namer_func_t namer)
 Sets the function used to derive the name of the field for this element when logging to journald targets.
 
STUMPLESS_PUBLIC_FUNCTION struct stumpless_paramstumpless_set_param_journald_namer (struct stumpless_param *param, stumpless_param_namer_func_t namer)
 Sets the function used to derive the name of the field for this param when logging to journald targets.
 

Detailed Description

Functions that help when using journald targets.

Function Documentation

◆ stumpless_get_element_journald_namer()

STUMPLESS_PUBLIC_FUNCTION stumpless_element_namer_func_t stumpless_get_element_journald_namer ( const struct stumpless_element * element)

Gets the function used to derive the name of the field for this element when logging to journald targets.

Thread Safety: MT-Safe This function is thread safe. A mutex is used to coordinate with other accesses to the element.

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 which could be left locked.

Since
release v2.1.0
Parameters
elementThe element to get the function of.
Returns
The namer function of the element if no error is encountered. If an error is encountered, NULL is returned and an error code is set appropriately.

◆ stumpless_get_param_journald_namer()

STUMPLESS_PUBLIC_FUNCTION stumpless_param_namer_func_t stumpless_get_param_journald_namer ( const struct stumpless_param * param)

Gets the function used to derive the name of the field for this param when logging to journald targets.

Thread Safety: MT-Safe This function is thread safe. A mutex is used to coordinate with other accesses to the param.

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 which could be left locked.

Since
release v2.1.0
Parameters
paramThe param to get the function of.
Returns
The namer function of the param if no error is encountered. If an error is encountered, NULL is returned and an error code is set appropriately.

◆ stumpless_set_element_journald_namer()

STUMPLESS_PUBLIC_FUNCTION struct stumpless_element * stumpless_set_element_journald_namer ( struct stumpless_element * element,
stumpless_element_namer_func_t namer )

Sets the function used to derive the name of the field for this element when logging to journald targets.

Thread Safety: MT-Safe This function is thread safe. A mutex is used to coordinate with other accesses to the element.

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 which could be left locked.

Since
release v2.1.0
Parameters
elementThe element to set the function of.
namerThe naming function to use for the element.
Returns
The modified element if no error is encountered. In the event of an error, NULL is returned and an error code is set appropriately.

◆ stumpless_set_param_journald_namer()

STUMPLESS_PUBLIC_FUNCTION struct stumpless_param * stumpless_set_param_journald_namer ( struct stumpless_param * param,
stumpless_param_namer_func_t namer )

Sets the function used to derive the name of the field for this param when logging to journald targets.

Thread Safety: MT-Safe This function is thread safe. A mutex is used to coordinate with other accesses to the param.

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 which could be left locked.

Since
release v2.1.0
Parameters
paramThe param to set the function of.
namerThe naming function to use for the param.
Returns
The modified param if no error is encountered. In the event of an error, NULL is returned and an error code is set appropriately.