14 lines
538 B
C
Executable File
14 lines
538 B
C
Executable File
#ifndef _LOG_H
|
|
#define _LOG_H
|
|
|
|
#include "syslog.h"
|
|
|
|
#define SYSLOG_INIT(program_name) openlog(program_name, LOG_CONS | LOG_PERROR |LOG_PID, LOG_USER)
|
|
#define SYSLOG_EXIT() closelog();
|
|
#define SYSLOG_DEBUG(fmt, ...) syslog(LOG_DEBUG, fmt, ##__VA_ARGS__)
|
|
#define SYSLOG_INFO(fmt, ...) syslog(LOG_INFO, fmt, ##__VA_ARGS__)
|
|
#define SYSLOG_WARN(fmt, ...) syslog(LOG_WARNING, fmt, ##__VA_ARGS__)
|
|
#define SYSLOG_ERR(fmt, ...) syslog(LOG_ERR, fmt, ##__VA_ARGS__)
|
|
|
|
#endif
|