Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: querylog: define which information should be logged (#765) #766

Merged
merged 4 commits into from
Nov 26, 2022

Conversation

0xERR0R
Copy link
Owner

@0xERR0R 0xERR0R commented Nov 24, 2022

closes #765

@0xERR0R 0xERR0R added the 🔨 enhancement New feature or request label Nov 24, 2022
@0xERR0R 0xERR0R added this to the 0.21 milestone Nov 24, 2022
@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Base: 89.15% // Head: 89.33% // Increases project coverage by +0.17% 🎉

Coverage data is based on head (4a43a6b) compared to base (fb0810f).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #766      +/-   ##
===============================================
+ Coverage        89.15%   89.33%   +0.17%     
===============================================
  Files               42       42              
  Lines             4833     4876      +43     
===============================================
+ Hits              4309     4356      +47     
+ Misses             454      451       -3     
+ Partials            70       69       -1     
Impacted Files Coverage Δ
config/config.go 88.73% <ø> (ø)
querylog/database_writer.go 82.35% <100.00%> (ø)
querylog/file_writer.go 100.00% <100.00%> (ø)
querylog/logger_writer.go 100.00% <100.00%> (ø)
resolver/query_logging_resolver.go 98.49% <100.00%> (+5.08%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

resolver/query_logging_resolver.go Outdated Show resolved Hide resolved
resolver/query_logging_resolver.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@ThinkChaos ThinkChaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@0xERR0R 0xERR0R merged commit 2b49c20 into development Nov 26, 2022
@delete-merged-branch delete-merged-branch bot deleted the fb-querylog-fields branch November 26, 2022 21:12
Comment on lines -114 to -115
util.QuestionToString(request.Req.Question),
util.AnswerToString(response.Res.Answer),
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obfuscates question and answer if log privacy is enabled

entry.Answer = util.AnswerToString(response.Res.Answer)

case config.QueryLogFieldQuestion:
entry.QuestionName = request.Req.Question[0].Name
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use util.QuestionToString -> this will obfuscate question if log privacy is enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

querylog: define which information should be logged
3 participants