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

DRY up signature request log.Fields #786

Open
g-k opened this issue Oct 7, 2021 · 2 comments
Open

DRY up signature request log.Fields #786

g-k opened this issue Oct 7, 2021 · 2 comments
Labels
code quality code improvements and tidiness good first issue

Comments

@g-k
Copy link
Contributor

g-k commented Oct 7, 2021

nit: Seeing this set of fields in a number of locations, I wonder if this should be moved to a struct that can output a log.Fields.

Originally posted by @ajvb in #782 (comment)

@g-k
Copy link
Contributor Author

g-k commented Oct 7, 2021

An alternative or additional option, #782 (comment)

The logrus readme includes this example:

  // A common pattern is to re-use fields between logging statements by re-using
  // the logrus.Entry returned from WithFields()
  contextLogger := log.WithFields(log.Fields{
    "common": "this is a common field",
    "other": "I also should be logged always",
  })

so that might be an option too. Unless you think it should be addressed in this PR I'll take a TODO and file an issue to clean that up.

@g-k
Copy link
Contributor Author

g-k commented Oct 7, 2021

This would dedupe some code and standardize the logs a bit more.

@g-k g-k added the code quality code improvements and tidiness label Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality code improvements and tidiness good first issue
Projects
None yet
Development

No branches or pull requests

1 participant