Demonstrates usage of the basic logging calls (stump(), stump_str(), stumpless_add_message(), stumplog()).
Demonstrates usage of the basic logging calls (stump(), stump_str(), stumpless_add_message(), stumplog()).
#include <stdlib.h>
int
main( int argc, char **argv ) {
const char *username = "example-username";
stump(
"The hello world of stumpless." );
stump(
"Login failed for username %s", username );
#ifdef STUMPLESS_NETWORK_TARGETS_SUPPORTED
#endif
#ifdef STUMPLESS_NETWORK_TARGETS_SUPPORTED
#endif
return EXIT_SUCCESS;
}
STUMPLESS_PUBLIC_FUNCTION void stumpless_close_file_target(struct stumpless_target *target)
Closes a file target.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_open_file_target(const char *name)
Opens a file target.
STUMPLESS_PUBLIC_FUNCTION int stump(const char *message,...)
Logs a message to the default target.
STUMPLESS_PUBLIC_FUNCTION int stump_str(const char *message)
Logs a message to the default target.
STUMPLESS_PUBLIC_FUNCTION void stumpless_free_all(void)
Closes the default target if it has been opened, frees all memory allocated internally,...
STUMPLESS_PUBLIC_FUNCTION void stumpless_close_network_target(const struct stumpless_target *target)
Closes a network target.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_open_udp4_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv4 and UDP.
A target that log entries can be sent to.
Definition target.h:140
The main header file for the stumpless logging library.
STUMPLESS_PUBLIC_FUNCTION int stumpless_add_message(struct stumpless_target *target, const char *message,...)
Adds a message to a given target.