Drop %m gnuism from internal log macro
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
3e4000b25a
commit
ea2565ce4e
@ -34,8 +34,10 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <netdb.h> /* struct addrinfo */
|
#include <netdb.h> /* struct addrinfo */
|
||||||
|
#include <string.h>
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <sys/klog.h>
|
#include <sys/klog.h>
|
||||||
#endif
|
#endif
|
||||||
@ -131,7 +133,7 @@
|
|||||||
#define str(s) #s
|
#define str(s) #s
|
||||||
|
|
||||||
/* Helper internal log macros */
|
/* Helper internal log macros */
|
||||||
#define ERR(fmt, args...) flog(LOG_SYSLOG | LOG_ERR, fmt ": %m", ##args)
|
#define ERR(fmt, args...) flog(LOG_SYSLOG | LOG_ERR, fmt ": %s", ##args, strerror(errno))
|
||||||
#define ERRX(fmt, args...) flog(LOG_SYSLOG | LOG_ERR, fmt, ##args)
|
#define ERRX(fmt, args...) flog(LOG_SYSLOG | LOG_ERR, fmt, ##args)
|
||||||
#define WARN(fmt, args...) flog(LOG_SYSLOG | LOG_WARN, fmt, ##args)
|
#define WARN(fmt, args...) flog(LOG_SYSLOG | LOG_WARN, fmt, ##args)
|
||||||
#define NOTE(fmt, args...) flog(LOG_SYSLOG | LOG_NOTICE, fmt, ##args)
|
#define NOTE(fmt, args...) flog(LOG_SYSLOG | LOG_NOTICE, fmt, ##args)
|
||||||
|
Loading…
Reference in New Issue
Block a user