pub unsafe extern "C" fn stumpless_load_entry(
entry: *mut stumpless_entry,
facility: stumpless_facility,
severity: stumpless_severity,
app_name: *const c_char,
msgid: *const c_char,
message: *const c_char,
...
) -> *mut stumpless_entryExpand description
Loads an entry struct with the given characteristics.
The message must be a valid format specifier string provided along with the appropriate number of variable arguments afterwards. This means that it should not be a user-controlled value under any circumstances. If you need a safer alternative without the risks of format strings, use \c stumpless_load_entry_str instead.
This function has the same behavior as stumpless_new_entry, except it does not create a new entry, instead loading an existing struct.
@since release v2.2.0
@param entry The struct to load.
@param facility The facility code of the event this entry describes. This should be a \c STUMPLESS_FACILITY value.
@param severity The severity code of the event this entry describes. This should be a \c STUMPLESS_SEVERITY value.
@param app_name The app_name of the entry. If this is NULL, then it will be blank in the entry (a single ‘-’ character).
@param msgid The message id of the entry. If this is NULL, then it will be blank in the entry (a single ‘-’ character).
@param message The message in the entry. This message may contain any format specifiers valid in \c printf. This also means that characters such as % need to be escaped as they would be in printf. If this is NULL, then it will be blank in the entry (no characters). This must be a valid UTF-8 string in shortest form.
@param … Substitutions for any format specifiers provided in message. The number of substitutions provided must exactly match the number of specifiers given.
@return The loaded entry if no error is encountered. If an error is encountered, then NULL is returned and an error code is set appropriately.