Skip to content

Commit

Permalink
Merge pull request #7 from thomas-tacquet/prepare-1-2-1
Browse files Browse the repository at this point in the history
prepare for 1.2.1
  • Loading branch information
thomas-tacquet authored Sep 15, 2022
2 parents 3758ad9 + d81c63d commit 7379787
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 8 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,52 @@

All notable changes to this project will be documented in this file.

## 1.2.1

### Changed

- Using withFields from logrus to pass the set of parameters

### Removed

- Colorful option (because Logrus can't really handle it, especially when logs are redirected to a file)

### Fixed

- Duplicate information in trace logs (duration and lines affected)

## 1.2.0

### Added

- Gorm options support

### Fixed

- upgrade dependencies for maintenance

## 1.1.2

### Fixed

- upgrade dependencies (this is a maintenance release)

## 1.1.1

### Fixed

- upgrade dependencies (this is a maintenance release)

## 1.1.0

### Added

- Missing log level management
- "SLOW SQL" Prefix on slow sql logs

## 1.0.0

### Added

- Gormlog library
- Example in readme
- Example in readme
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# gormv2-logrus

Easily connect Gorm V2 and logrus with customizable options

Usage example :
Usage example :

```go
package test
Expand All @@ -21,7 +22,7 @@ func myFunctionToConnectOnMyDB(e *logrus.Entry) {
CreateBatchSize: 1500,
SkipDefaultTransaction: true,
}

db, err := gorm.Open(
"CONNEXION STRING",
gormConfig,
Expand Down Expand Up @@ -54,6 +55,6 @@ You can also add customization options :

> Colorful option has been removed, because Logrus can't really handle the color code, especially if the logs are redirected to a file, the characters are not removed automatically
## Contibuting
## Contibuting

Just feel free to open issues, ask questions, make proposals.
Just feel free to open issues, ask questions, make proposals.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.0
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
golang.org/x/sys v0.0.0-20220913175220-63ea55921009 // indirect
gorm.io/driver/sqlite v1.3.6
gorm.io/gorm v1.23.8
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY=
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220913175220-63ea55921009 h1:PuvuRMeLWqsf/ZdT1UUZz0syhioyv1mzuFZsXs4fvhw=
golang.org/x/sys v0.0.0-20220913175220-63ea55921009/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down

0 comments on commit 7379787

Please sign in to comment.