26#ifndef __LOG_HEADER_GUARD__
27#define __LOG_HEADER_GUARD__
51#define LOG_SYSJRNL 100
53#if defined(__linux__) || defined(__sun)
59#include <sys/varargs.h>
88#define n_log(__LEVEL__, ...) \
90 _n_log(__LEVEL__, __FILE__, __func__, __LINE__, __VA_ARGS__); \
114void _n_log(
int level,
const char* file,
const char* func,
int line,
const char* format, ...);
pthread_mutex_t LOG_MUTEX
mutex for thread-safe writting
FILE * get_log_file(void)
get the log file name if any
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.
void close_sysjrnl(void)
close syslog / free name for event log
char * open_sysjrnl(const char *identity)
Open a syslog / set name for event log.
int close_safe_logging(TS_LOG *log)
close a thread-safe logging file
int set_log_file(char *file)
set a file as standard log output
void set_log_level(const int log_level)
Set global log level.
void _n_log(int level, const char *file, const char *func, int line, const char *format,...)
Full log function.
int get_log_level(void)
Return the global log level.
ThreadSafe LOGging structure.
Common headers and low-level functions & define.