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

Add type suffixes to all keys when logging #275

merged 4 commits into from Jul 18, 2019
Changes from 1 commit
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now


Update loghooks/key_suffix_hook.go

Co-Authored-By: Fabio B <>
  • Loading branch information
albrow and fabioberger committed Jul 18, 2019
commit 065eabe39afacac4b3c455f6d2e9da5d0bf763dd
@@ -59,7 +59,7 @@ func (h *KeySuffixHook) Fire(entry *log.Entry) error {
// getTypeForValue returns a string representation of the type of the given val.
func getTypeForValue(val interface{}) (string, error) {
if _, ok := val.(json.Marshaler); ok {
// If val implements json.Marhsler, return the type of json.Marshal(val)
// If val implements json.Marshaler, return the type of json.Marshal(val)
// instead of the type of val.
buf := &bytes.Buffer{}
if err := json.NewEncoder(buf).Encode(val); err != nil {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.