File tree 3 files changed +13
-7
lines changed
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
6
6
7
7
## [ Unreleased]
8
8
9
+ ## [ 8.0.1] - 2022-06-23
10
+ ### Fixed
11
+ - Handling un-hashable tag values during dedupe process.
12
+
9
13
## [ 8.0.0] - 2022-06-07
10
14
### Added
11
15
- 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
26
30
- Removed ability to remove individual log levels externally; RemoveHandler+AddHandler can do the same.
27
31
28
32
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
30
35
[ 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 1
1
## 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 )
3
3
[ ![ Test] ( https://github.com/go-playground/log/actions/workflows/go.yml/badge.svg )] ( https://github.com/go-playground/log/actions/workflows/go.yml )
4
4
[ ![ Coverage Status] ( https://coveralls.io/repos/github/go-playground/log/badge.svg?branch=master )] ( https://coveralls.io/github/go-playground/log?branch=master )
5
5
[ ![ 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 1
1
package log
2
2
3
3
import (
4
+ "fmt"
4
5
"strconv"
5
6
"strings"
6
7
@@ -15,20 +16,20 @@ func errorsWithError(e Entry, err error) Entry {
15
16
case errors.Chain :
16
17
types := make ([]byte , 0 , 32 )
17
18
tags := make ([]Field , 0 , len (t ))
18
- dedupeTags := make (map [Field ]bool )
19
+ dedupeTags := make (map [string ]bool )
19
20
dedupeType := make (map [string ]bool )
20
21
errorBuff := BytePool ().Get ()
21
22
for _ , e := range t {
22
23
errorBuff .B = formatLink (e , errorBuff .B )
23
24
errorBuff .B = append (errorBuff .B , ' ' )
24
25
25
26
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 ] {
28
29
continue
29
30
}
30
- dedupeTags [field ] = true
31
- tags = append (tags , field )
31
+ dedupeTags [key ] = true
32
+ tags = append (tags , Field { Key : tag . Key , Value : tag . Value } )
32
33
}
33
34
for _ , typ := range e .Types {
34
35
if dedupeType [typ ] {
You can’t perform that action at this time.
0 commit comments