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

update error dep #53

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [8.1.0] - 2023-08-16
## [8.1.1] - 2023-08-16
### Fixed
- errors.Link output in error function after updating dependency.

## [8.1.0] - 2023-08-15
### Added
- log.G as shorthand for adding a set of Grouped fields. This ability has always been present but is now fully supported in the default logger and with helper function for ease of use.
- slog support added in Go 1.21+ both to use as an slog.Handler or redirect.
Expand Down Expand Up @@ -42,7 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed ability to remove individual log levels externally; RemoveHandler+AddHandler can do the same.


[Unreleased]: https://github.com/go-playground/log/compare/v8.1.0...HEAD
[Unreleased]: https://github.com/go-playground/log/compare/v8.1.1...HEAD
[8.1.1]: https://github.com/go-playground/log/compare/v8.1.1...v8.1.1
[8.1.0]: https://github.com/go-playground/log/compare/v8.0.2...v8.1.0
[8.0.2]: https://github.com/go-playground/log/compare/v8.0.1...v8.0.2
[8.0.1]: https://github.com/go-playground/log/compare/v8.0.0...v8.0.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## log
<img align="center" src="https://raw.githubusercontent.com/go-playground/log/master/logo.png">![Project status](https://img.shields.io/badge/version-8.1.0-green.svg)
<img align="center" src="https://raw.githubusercontent.com/go-playground/log/master/logo.png">![Project status](https://img.shields.io/badge/version-8.1.1-green.svg)
[![Test](https://github.com/go-playground/log/actions/workflows/go.yml/badge.svg)](https://github.com/go-playground/log/actions/workflows/go.yml)
[![Coverage Status](https://coveralls.io/repos/github/go-playground/log/badge.svg?branch=master)](https://coveralls.io/github/go-playground/log?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/log)](https://goreportcard.com/report/github.com/go-playground/log)
Expand Down
9 changes: 5 additions & 4 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package log

import (
"fmt"
"github.com/go-playground/errors/v5"
"strconv"
"strings"

"github.com/go-playground/errors/v5"
runtimeext "github.com/go-playground/pkg/v5/runtime"
)

Expand Down Expand Up @@ -102,11 +102,12 @@ func formatLink(l *errors.Link, b []byte) []byte {
b = extractSource(b, l.Source)
if l.Prefix != "" {
b = append(b, l.Prefix...)

if l.Err != nil {
}
if l.Err != nil {
if l.Prefix != "" {
b = append(b, ": "...)
b = append(b, l.Err.Error()...)
}
b = append(b, l.Err.Error()...)
}
return b
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/go-playground/log/v8
go 1.18

require (
github.com/go-playground/errors/v5 v5.3.1
github.com/go-playground/errors/v5 v5.3.2
github.com/go-playground/pkg/v5 v5.21.2
golang.org/x/term v0.11.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/go-playground/errors/v5 v5.3.1 h1:J2qU+9Whg863g3SATXKSJyFA91Zz85pYD3+obr5Oodk=
github.com/go-playground/errors/v5 v5.3.1/go.mod h1:LcLhmzQ/RuEntAs9r38NSV+xtbHffhMx/1yuuEroc7M=
github.com/go-playground/errors/v5 v5.3.2 h1:B3fsF2CAUrc9XI6L95MtEs20qC5q5tPEFgNBGDwhZMc=
github.com/go-playground/errors/v5 v5.3.2/go.mod h1:LcLhmzQ/RuEntAs9r38NSV+xtbHffhMx/1yuuEroc7M=
github.com/go-playground/pkg/v5 v5.21.2 h1:DgVr88oMI3pfMFkEN9E6hp9YGG8NHc+019LRJfnUOfU=
github.com/go-playground/pkg/v5 v5.21.2/go.mod h1:UgHNntEQnMJSygw2O2RQ3LAB0tprx81K90c/pOKh7cU=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
Expand Down