Commit 0329eba9 authored by Daniel Salzman's avatar Daniel Salzman

log: remove compatibility logging wrappers

parent 66b0f287
/* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -130,11 +130,6 @@ __attribute__((format(printf, 4, 5)));
void log_fmt_zone_str(int priority, log_source_t src, const char *zone, const char *fmt, ...)
__attribute__((format(printf, 4, 5)));
/* Compatibility wrappers. */
#define log_msg(priority, fmt, ...) log_fmt(priority, LOG_SOURCE_SERVER, fmt, ##__VA_ARGS__)
#define log_msg_zone(priority, zone, fmt, ...) log_fmt_zone(priority, LOG_SOURCE_ZONE, zone, fmt, ##__VA_ARGS__)
#define log_msg_zone_str(priority, zone, fmt, ...) log_fmt_zone_str(priority, LOG_SOURCE_ZONE, zone, fmt, ##__VA_ARGS__)
/*!
* \brief Convenient logging macros.
*/
......
/* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -43,11 +43,11 @@
/*! Configuration specific logging. */
#define CONF_LOG(severity, msg, ...) do { \
log_msg(severity, "config, " msg, ##__VA_ARGS__); \
log_fmt(severity, LOG_SOURCE_SERVER, "config, " msg, ##__VA_ARGS__); \
} while (0)
#define CONF_LOG_ZONE(severity, zone, msg, ...) do { \
log_msg_zone(severity, zone, "config, " msg, ##__VA_ARGS__); \
log_fmt_zone(severity, LOG_SOURCE_ZONE, zone, "config, " msg, ##__VA_ARGS__); \
} while (0)
/*! Configuration getter output. */
......
/* Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -81,7 +81,7 @@ static inline const char *log_direction_name(enum log_direction direction)
do { \
char address[SOCKADDR_STRLEN] = ""; \
sockaddr_tostr(address, sizeof(address), remote); \
log_msg_zone(priority, zone, "%s, %s, %s: " fmt, \
log_fmt_zone(priority, LOG_SOURCE_ZONE, zone, "%s, %s, %s: " fmt, \
log_operation_name(op), log_direction_name(dir), address, \
## __VA_ARGS__); \
} while (0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment