Nilorea Library log api test.
int main(void) {
puts("LOG_NULL");
puts("EMERG");
puts("ALERT");
puts("CRIT");
puts("ERR");
puts("WARNING");
puts("NOTICE");
puts("INFO");
puts("DEBUG");
init_nodup_log(0);
exit(0);
}
#define Free(__ptr)
Free Handler to get errors.
#define LOG_ALERT
action must be taken immediately
int write_safe_log(TS_LOG *log, char *pat,...)
write to a thread-safe logging file
int open_safe_logging(TS_LOG **log, char *pathname, char *opt)
Open a thread-safe logging file.
#define LOG_EMERG
system is unusable
#define n_log(__LEVEL__,...)
Logging function wrapper to get line and func.
#define LOG_DEBUG
debug-level messages
#define LOG_ERR
error conditions
#define LOG_CRIT
critical conditions
int close_safe_logging(TS_LOG *log)
close a thread-safe logging file
int set_log_file(char *file)
Set the logging to a file instead of stderr.
void set_log_level(const int log_level)
Set the global log level value ( static int LOG_LEVEL )
#define LOG_NOTICE
normal but significant condition
#define LOG_WARNING
warning conditions
#define LOG_NULL
no log output
#define LOG_INFO
informational
ThreadSafe LOGging structure.
#define n_nodup_log(__LEVEL__,...)
nodup log macro helper
int dump_nodup_log(char *file)
Dump the duplicate error log hash table in a file The table is first written to a temporary file whic...
int close_nodup_log()
Empty nodup logtable and close the no duplicate logging session.
#define n_nodup_log_indexed(__LEVEL__, __PREF__,...)
nodup log indexed macro helper
Generic No Dup Log system.