summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTomas Krizek <tomas.krizek@nic.cz>2021-07-08 13:28:11 +0200
committerTomas Krizek <tomas.krizek@nic.cz>2021-07-29 11:42:33 +0200
commit3dcd816b4fa3414d8d5b39395faf7328b418fc8f (patch)
tree9bf0b87213ba29ce018f077e48f36ebd6e9788d9 /lib
parentlogging: print group name padded to 6 characters (diff)
downloadknot-resolver-3dcd816b4fa3414d8d5b39395faf7328b418fc8f.tar.xz
knot-resolver-3dcd816b4fa3414d8d5b39395faf7328b418fc8f.zip
logging: add LOG_GRP_DEVEL
This serves two purposes: 1. As a utility logger during development. 2. As the last entry in enum - to make iteration over the values possible. Changing the value of LOG_GRP_DEVEL shouldn't be an issue, since it shouldn't be used in production code.
Diffstat (limited to 'lib')
-rw-r--r--lib/log.c1
-rw-r--r--lib/log.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/log.c b/lib/log.c
index 81eaeceb..5ccfc661 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -63,6 +63,7 @@ log_group_names_t log_group_names[] = {
GRP_NAME_ITEM(LOG_GRP_NSID),
GRP_NAME_ITEM(LOG_GRP_DNSTAP),
GRP_NAME_ITEM(LOG_GRP_TESTS),
+ GRP_NAME_ITEM(LOG_GRP_DEVEL),
{ NULL, -1 },
};
diff --git a/lib/log.h b/lib/log.h
index c3fb5db5..efd17bc8 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -69,6 +69,8 @@ enum kr_log_groups_type {
LOG_GRP_NSID,
LOG_GRP_DNSTAP,
LOG_GRP_TESTS,
+ /* ^^ Add new log groups above ^^. */
+ LOG_GRP_DEVEL, /* Must be last entry in enum! */
};
@@ -111,6 +113,7 @@ enum kr_log_groups_type {
#define LOG_GRP_NSID_TAG "nsid"
#define LOG_GRP_DNSTAP_TAG "dnstap"
#define LOG_GRP_TESTS_TAG "tests"
+#define LOG_GRP_DEVEL_TAG "devel"
KR_EXPORT
extern log_groups_t kr_log_groups;