File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88
9+ ## [ 8.0.1] - 2022-06-23
10+ ### Fixed
11+ - Handling un-hashable tag values during dedupe process.
12+
913## [ 8.0.0] - 2022-06-07
1014### Added
1115- Automatic file, line and package addition to error log when using ` WithError ` .
@@ -26,5 +30,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2630- Removed ability to remove individual log levels externally; RemoveHandler+AddHandler can do the same.
2731
2832
29- [ Unreleased ] : https://github.com/go-playground/log/compare/v8.0.0...HEAD
33+ [ Unreleased ] : https://github.com/go-playground/log/compare/v8.0.1...HEAD
34+ [ 8.0.1 ] : https://github.com/go-playground/log/compare/v8.0.0...v8.0.1
3035[ 8.0.0 ] : https://github.com/go-playground/log/compare/v7.0.2...v8.0.0
Original file line number Diff line number Diff line change 11## log
2- <img align =" center " src =" https://raw.githubusercontent.com/go-playground/log/master/logo.png " >![ Project status] ( https://img.shields.io/badge/version-8.0.0 -green.svg )
2+ <img align =" center " src =" https://raw.githubusercontent.com/go-playground/log/master/logo.png " >![ Project status] ( https://img.shields.io/badge/version-8.0.1 -green.svg )
33[ ![ Test] ( https://github.com/go-playground/log/actions/workflows/go.yml/badge.svg )] ( https://github.com/go-playground/log/actions/workflows/go.yml )
44[ ![ Coverage Status] ( https://coveralls.io/repos/github/go-playground/log/badge.svg?branch=master )] ( https://coveralls.io/github/go-playground/log?branch=master )
55[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/go-playground/log )] ( https://goreportcard.com/report/github.com/go-playground/log )
Original file line number Diff line number Diff line change 11package log
22
33import (
4+ "fmt"
45 "strconv"
56 "strings"
67
@@ -15,20 +16,20 @@ func errorsWithError(e Entry, err error) Entry {
1516 case errors.Chain :
1617 types := make ([]byte , 0 , 32 )
1718 tags := make ([]Field , 0 , len (t ))
18- dedupeTags := make (map [Field ]bool )
19+ dedupeTags := make (map [string ]bool )
1920 dedupeType := make (map [string ]bool )
2021 errorBuff := BytePool ().Get ()
2122 for _ , e := range t {
2223 errorBuff .B = formatLink (e , errorBuff .B )
2324 errorBuff .B = append (errorBuff .B , ' ' )
2425
2526 for _ , tag := range e .Tags {
26- field := Field { Key : tag .Key , Value : tag .Value }
27- if dedupeTags [field ] {
27+ key := fmt . Sprintf ( "%s-%v" , tag .Key , tag .Value )
28+ if dedupeTags [key ] {
2829 continue
2930 }
30- dedupeTags [field ] = true
31- tags = append (tags , field )
31+ dedupeTags [key ] = true
32+ tags = append (tags , Field { Key : tag . Key , Value : tag . Value } )
3233 }
3334 for _ , typ := range e .Types {
3435 if dedupeType [typ ] {
You can’t perform that action at this time.
0 commit comments