diff options
author | Tomas Krizek <tomas.krizek@nic.cz> | 2021-07-08 13:28:11 +0200 |
---|---|---|
committer | Tomas Krizek <tomas.krizek@nic.cz> | 2021-07-29 11:42:33 +0200 |
commit | 3dcd816b4fa3414d8d5b39395faf7328b418fc8f (patch) | |
tree | 9bf0b87213ba29ce018f077e48f36ebd6e9788d9 /lib | |
parent | logging: print group name padded to 6 characters (diff) | |
download | knot-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.c | 1 | ||||
-rw-r--r-- | lib/log.h | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -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 }, }; @@ -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; |