pub unsafe extern "C" fn stump_str(message: *const c_char) -> c_intExpand description
Logs a message to the default target.
Thread Safety: MT-Safe env locale
This function is thread safe. Different target types handle thread safety
differently, as some require per-target locks and others can rely on system
libraries to log safely, but all targets support thread safe logging in some
manner. For target-specific information on how thread safety is supported and
whether AS or AC safety can be assumed, refer to the documentation for the
target’s header file (in the stumpless/target include folder). For all
targets, the environment variables and locale will be used during some of the
string formatting of the message.
Async Signal Safety: AS-Unsafe lock heap This function is not safe to call from signal handlers as some targets make use of non-reentrant locks to coordinate access. It also may make memory allocation calls to create internal cached structures, and memory allocation may not be signal safe.
Async Cancel Safety: AC-Unsafe lock heap This function is not safe to call from threads that may be asynchronously cancelled, due to the use of locks in some targets that could be left locked and the potential for memory allocation.
@since release v2.1.0
@param message The message to log. This must be a valid UTF-8 string in shortest form.
@return A non-negative value if no error is encountered. If an error is encountered, then a negative value is returned and an error code is set appropriately. If the entry was rejected by the target’s filter, then 0 is returned.