Skip to content

Add metadata for response Type and Class to Log.#7806

Merged
yongtang merged 1 commit into
coredns:masterfrom
h110hawk:add-response-type-and-class-metadata-to-log
Jan 26, 2026
Merged

Add metadata for response Type and Class to Log.#7806
yongtang merged 1 commit into
coredns:masterfrom
h110hawk:add-response-type-and-class-metadata-to-log

Conversation

@h110hawk

@h110hawk h110hawk commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

1. Why is this pull request needed and what does it do?

Adds metadata for response Class and Type to the log plugin. This allows differentiation of "NODATA" from other NOERROR log lines when logging success and denial.

Adding {/log/class} {/log/type} to the default format yields uniquely parsable data for each of these three test cases:

[INFO] 127.0.0.1:41478 - 45106 SRV IN example.org. udp 29 false 512 NOERROR qr,aa,rd,ra 119 0.099735863s denial NODATA
[INFO] 127.0.0.1:37844 - 7183 A IN example.org. udp 29 false 512 NOERROR qr,rd,ra 83 0.102162208s success NOERROR
[INFO] 127.0.0.1:46590 - 39391 SRV IN example.fake. udp 30 false 512 NXDOMAIN qr,aa,rd,ra 105 0.099880694s denial NXDOMAIN

2. Which issues (if any) are related?

n/a

3. Which documentation changes (if any) need to be made?

Added a quick snippet in README.md.

4. Does this introduce a backward incompatible change or deprecation?

No.

I wasn't sure where this code should live and so I put it somewhere where it worked. I'm not familiar at all with this codebase. If it should go somewhere else please let me know.

Signed-off-by: Kelly Kane <kelly@hawknetworks.com>
@yongtang yongtang merged commit b3d79f5 into coredns:master Jan 26, 2026
11 checks passed
yongtang pushed a commit to yongtang/coredns that referenced this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants