Commit 0bf72d5c authored by Jan Včelák's avatar Jan Včelák 🚀

move logging from libknot to server

parent 5ac3c016
......@@ -127,14 +127,12 @@ nobase_libknot_la_HEADERS = \
libknot/internal/base32hex.h \
libknot/internal/base64.h \
libknot/internal/binsearch.h \
libknot/internal/debug.h \
libknot/internal/endian.h \
libknot/internal/errors.h \
libknot/internal/getline.h \
libknot/internal/heap.h \
libknot/internal/hhash.h \
libknot/internal/lists.h \
libknot/internal/log.h \
libknot/internal/macros.h \
libknot/internal/mem.h \
libknot/internal/mempattern.h \
......@@ -186,7 +184,6 @@ libknot_la_SOURCES = \
libknot/internal/heap.c \
libknot/internal/hhash.c \
libknot/internal/lists.c \
libknot/internal/log.c \
libknot/internal/mem.c \
libknot/internal/mempattern.c \
libknot/internal/mempool.c \
......@@ -263,6 +260,8 @@ libknotd_la_SOURCES = \
knot/common/evsched.h \
knot/common/fdset.c \
knot/common/fdset.h \
knot/common/log.c \
knot/common/log.h \
knot/common/ref.c \
knot/common/ref.h \
knot/common/time.h \
......
This diff is collapsed.
......@@ -28,11 +28,11 @@
#include <systemd/sd-journal.h>
#endif
#include "libknot/internal/log.h"
#include "knot/common/log.h"
#include "libknot/errcode.h"
#include "libknot/internal/lists.h"
#include "libknot/internal/strlcpy.h"
#include "libknot/internal/macros.h"
#include "libknot/errcode.h"
#include "libknot/internal/strlcpy.h"
/* Single log message buffer length (one line). */
#define LOG_BUFLEN 512
......
......@@ -37,7 +37,7 @@
#include "knot/conf/conf.h"
#include "knot/conf/includes.h"
#include "knot/conf/extra.h"
#include "libknot/internal/log.h"
#include "knot/common/log.h"
#include "libknotd_la-cf-parse.h" /* Automake generated header. */
/* Imported symbols. */
......
......@@ -39,7 +39,7 @@
#include "libknot/dnssec/policy.h"
#include "libknot/internal/lists.h"
#include "libknot/internal/namedb/namedb.h"
#include "libknot/internal/log.h"
#include "knot/common/log.h"
#include "knot/updates/acl.h"
#include "libknot/internal/sockaddr.h"
#include "libknot/internal/trie/hat-trie.h"
......
......@@ -18,6 +18,7 @@
#include <sys/stat.h>
#include "knot/common/debug.h"
#include "knot/common/fdset.h"
#include "knot/common/log.h"
#include "knot/conf/conf.h"
#include "knot/ctl/remote.h"
#include "knot/dnssec/zone-sign.h"
......@@ -25,7 +26,6 @@
#include "knot/server/tcp-handler.h"
#include "knot/zone/timers.h"
#include "libknot/libknot.h"
#include "libknot/internal/log.h"
#include "libknot/internal/macros.h"
#include "libknot/internal/mem.h"
#include "libknot/internal/net.h"
......
......@@ -17,7 +17,7 @@
#include <assert.h>
#include <stdint.h>
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "knot/dnssec/nsec-chain.h"
#include "knot/dnssec/zone-sign.h"
#include "libknot/dnssec/rrset-sign.h"
......
......@@ -24,7 +24,7 @@
#include "knot/dnssec/zone-keys.h"
#include "knot/dnssec/zone-nsec.h"
#include "knot/dnssec/zone-sign.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "knot/zone/zone.h"
static int init_dnssec_structs(const zone_contents_t *zone,
......
......@@ -19,7 +19,7 @@
#include <stdbool.h>
#include <inttypes.h>
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/internal/mem.h"
#include "libknot/internal/macros.h"
#include "libknot/errcode.h"
......
......@@ -21,7 +21,7 @@
#include <limits.h>
#include "libknot/internal/base32hex.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/descriptor.h"
#include "libknot/dnssec/bitmap.h"
#include "libknot/internal/utils.h"
......
......@@ -20,7 +20,7 @@
#include <sys/types.h>
#include <time.h>
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#include "libknot/internal/trie/hat-trie.h"
......
......@@ -20,7 +20,7 @@
#include "knot/nameserver/process_answer.h"
#include "knot/updates/apply.h"
#include "knot/zone/zonefile.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/descriptor.h"
#include "libknot/internal/lists.h"
......
......@@ -14,7 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/descriptor.h"
#include "libknot/rrtype/rdname.h"
#include "libknot/rrtype/soa.h"
......
......@@ -20,7 +20,7 @@
#include "knot/nameserver/process_query.h"
#include "knot/nameserver/process_answer.h"
#include "knot/updates/apply.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/descriptor.h"
#include "libknot/internal/utils.h"
#include "libknot/rrtype/soa.h"
......
......@@ -31,7 +31,7 @@
#include "knot/common/debug.h"
#include "knot/server/server.h"
#include "knot/nameserver/internet.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "knot/nameserver/process_query.h"
#include "knot/nameserver/tsig_ctx.h"
#include "knot/nameserver/process_answer.h"
......
......@@ -3,7 +3,7 @@
#include "knot/nameserver/internet.h"
#include "knot/dnssec/zone-nsec.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#define DNSSEC_ENABLED 1
......
......@@ -16,7 +16,7 @@
#include "libknot/rrtype/opt.h"
#include "libknot/tsig-op.h"
#include "libknot/descriptor.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/internal/macros.h"
/*! \brief Accessor to query-specific data. */
......
......@@ -19,7 +19,7 @@
#include "knot/nameserver/process_query.h"
#include "knot/updates/apply.h"
#include "knot/dnssec/zone-sign.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/internal/macros.h"
#include "knot/dnssec/zone-events.h"
#include "knot/updates/ddns.h"
......
......@@ -30,9 +30,9 @@
#endif /* HAVE_PTHREAD_NP_H */
#include "knot/common/debug.h"
#include "knot/common/log.h"
#include "knot/server/dthreads.h"
#include "libknot/libknot.h"
#include "libknot/internal/log.h"
/* BSD cpu set compatibility. */
#if defined(HAVE_CPUSET_BSD)
......
......@@ -17,7 +17,7 @@
#include <assert.h>
#include "knot/zone/contents.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/internal/macros.h"
#include "libknot/rrset.h"
#include "libknot/internal/base32hex.h"
......
......@@ -18,7 +18,7 @@
#include <stdlib.h>
#include <inttypes.h>
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/errcode.h"
#include "knot/zone/zone-diff.h"
#include "libknot/descriptor.h"
......
......@@ -14,7 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "libknot/internal/log.h"
#include "knot/common/log.h"
#include "knot/server/journal.h"
#include "knot/zone/zone-diff.h"
#include "knot/zone/zone-load.h"
......
......@@ -20,7 +20,7 @@
#include "knot/zone/zone-tree.h"
#include "knot/zone/node.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/internal/trie/hat-trie.h"
#include "libknot/internal/macros.h"
......
......@@ -26,7 +26,7 @@
#include "libknot/dname.h"
#include "libknot/packet/wire.h"
#include "knot/zone/node.h"
#include "libknot/internal/debug.h"
#include "knot/common/debug.h"
#include "libknot/internal/mempattern.h"
#include "libknot/internal/mempool.h"
#include "libknot/internal/macros.h"
......
......@@ -25,7 +25,6 @@
#include "libknot/consts.h"
#include "libknot/errcode.h"
#include "libknot/packet/wire.h"
#include "libknot/internal/debug.h"
#include "libknot/internal/macros.h"
#include "libknot/internal/mempattern.h"
#include "libknot/internal/tolower.h"
......
......@@ -19,8 +19,6 @@
#include "libknot/packet/compr.h"
#include "libknot/errcode.h"
#include "libknot/packet/pkt.h"
#include "libknot/internal/debug.h"
#include "libknot/internal/log.h"
#include "libknot/internal/macros.h"
#include "libknot/internal/tolower.h"
......
......@@ -25,8 +25,6 @@
#include "libknot/tsig-op.h"
#include "libknot/packet/wire.h"
#include "libknot/packet/rrset-wire.h"
#include "libknot/internal/debug.h"
#include "libknot/internal/log.h"
#include "libknot/internal/macros.h"
/*! \brief Scan packet for RRSet existence. */
......
......@@ -17,7 +17,6 @@
#include <assert.h>
#include "libknot/processing/layer.h"
#include "libknot/internal/debug.h"
#include "libknot/internal/macros.h"
/*! \brief Helper for conditional layer call. */
......@@ -27,18 +26,6 @@
layer->state = layer->api->func(layer, ##__VA_ARGS__); \
}
/* State -> string translation table. */
#ifdef KNOT_NS_DEBUG
#define LAYER_STATE_STR(x) _state_table[x]
static const char* _state_table[] = {
[KNOT_NS_PROC_NOOP] = "NOOP",
[KNOT_NS_PROC_MORE] = "MORE",
[KNOT_NS_PROC_FULL] = "FULL",
[KNOT_NS_PROC_DONE] = "DONE",
[KNOT_NS_PROC_FAIL] = "FAIL"
};
#endif /* KNOT_NS_DEBUG */
_public_
int knot_layer_begin(knot_layer_t *ctx, const knot_layer_api_t *api, void *param)
{
......
......@@ -22,7 +22,6 @@
#include "libknot/rrtype/opt.h"
#include "libknot/descriptor.h"
#include "libknot/errcode.h"
#include "libknot/internal/debug.h"
#include "libknot/internal/macros.h"
#include "libknot/internal/sockaddr.h"
......
......@@ -26,8 +26,6 @@
#include "libknot/dname.h"
#include "libknot/errcode.h"
#include "libknot/rrset.h"
#include "libknot/internal/debug.h"
#include "libknot/internal/log.h"
#include "libknot/internal/macros.h"
#include "libknot/internal/utils.h"
......
......@@ -29,8 +29,6 @@
#include "libknot/consts.h"
#include "libknot/dnssec/key.h"
#include "libknot/packet/rrset-wire.h"
#include "libknot/internal/debug.h"
#include "libknot/internal/log.h"
#include "libknot/internal/macros.h"
const int KNOT_TSIG_MAX_DIGEST_SIZE = 64; // size of HMAC-SHA512 digest
......
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