Demonstrates how to work with the severity levels of logged events.
Demonstrates how to work with the severity levels of logged events.
#include <stdlib.h>
int
main( int argc, char **argv ) {
stump_i(
"this message will have INFO severity" );
stumplog_i( STUMPLESS_FACILITY_KERN | STUMPLESS_SEVERITY_EMERG,
"THE SYSTEM IS DOWN!!!" );
return EXIT_SUCCESS;
}
#define stump_a(...)
Logs a message to the current target with alert severity.
Definition alert.h:97
#define stump_c(...)
Logs a message to the current target with crit severity.
Definition crit.h:97
#define stump_d(...)
Logs a message to the current target with debug severity.
Definition debug.h:97
#define stump_em(...)
Logs a message to the current target with emerg severity.
Definition emerg.h:97
#define stump_er(...)
Logs a message to the current target with err severity.
Definition err.h:97
#define stump_i(...)
Logs a message to the current target with info severity.
Definition info.h:97
#define stumplog_i(priority,...)
Adds a message to the current target with the specified priority.
Definition info.h:508
STUMPLESS_PUBLIC_FUNCTION void stumpless_free_all(void)
Closes the default target if it has been opened, frees all memory allocated internally,...
#define stump_n(...)
Logs a message to the current target with notice severity.
Definition notice.h:97
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_open_stdout_target(const char *name)
Opens a stream target for the stdout stream.
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 void stumpless_close_target(struct stumpless_target *target)
Closes a target.
#define stump_t(...)
Logs a message to the current target with debug severity, along with the file, line,...
Definition trace.h:106
#define stump_w(...)
Logs a message to the current target with warning severity.
Definition warning.h:97