Skip to content

Commit

Permalink
update dependencies to released versions, small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukseven committed Apr 17, 2024
1 parent eefb8bb commit d9985fd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/eluv-io/log-go
go 1.19

require (
github.com/eluv-io/apexlog-go v1.9.1-elv3.0.20240205085428-b9e81ee49181
github.com/eluv-io/apexlog-go v1.9.1-elv4
github.com/eluv-io/errors-go v1.0.2
github.com/eluv-io/utc-go v1.0.0
github.com/modern-go/gls v0.0.0-20220109145502-612d0167dce5
Expand All @@ -24,4 +24,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/modern-go/gls => github.com/eluv-io/gls v0.0.0-20240109172027-f54afc64be57
replace github.com/modern-go/gls => github.com/eluv-io/gls v1.0.0-elv1
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eluv-io/apexlog-go v1.9.1-elv3.0.20240205085428-b9e81ee49181 h1:u5dncbLB4f9PCVrC7Ba7Z9S5ojhojCaoyUIShH2ditc=
github.com/eluv-io/apexlog-go v1.9.1-elv3.0.20240205085428-b9e81ee49181/go.mod h1:pZhIuRbWTsOm5WEOxke9B2dczjQuaEGeJXEYd5lCxkk=
github.com/eluv-io/apexlog-go v1.9.1-elv4 h1:lJE8+Y+GtUhw1BBAlFePuVZg78jCKgeFsdqBtrjbtJc=
github.com/eluv-io/apexlog-go v1.9.1-elv4/go.mod h1:pZhIuRbWTsOm5WEOxke9B2dczjQuaEGeJXEYd5lCxkk=
github.com/eluv-io/errors-go v1.0.2 h1:PcTuyv0GziUlANKSRxLAxQJwns7ZC+O3U+D1yULJJ04=
github.com/eluv-io/errors-go v1.0.2/go.mod h1:bSd8y2sXPla5W9piijQn/RT00T2bC0Dce5ofvQ8vWws=
github.com/eluv-io/gls v0.0.0-20240109172027-f54afc64be57 h1:3Xd2e2/khksl5KohJGnrLS/+rYptG/+yhjHrNvXqzQE=
github.com/eluv-io/gls v0.0.0-20240109172027-f54afc64be57/go.mod h1:4rPCrom1ZvL5sqFMGiNbCr/QfDq3oljqXEBdstdge0o=
github.com/eluv-io/gls v1.0.0-elv1 h1:fV9z/aLSs5KH8wWMkamoS/Xxl8wmXF76WMx8/N5XEr8=
github.com/eluv-io/gls v1.0.0-elv1/go.mod h1:4rPCrom1ZvL5sqFMGiNbCr/QfDq3oljqXEBdstdge0o=
github.com/eluv-io/stack v1.8.2 h1:yocCvAcPy9vW5iBdNnig5Tem8LgOTT8JrOLvDcacnEQ=
github.com/eluv-io/stack v1.8.2/go.mod h1:MIN/UfmiJlJUFpglnJCj+7DR5sDBUuvQRTENHm1F310=
github.com/eluv-io/utc-go v1.0.0 h1:SUC9bdAginhb0a9qKZDY4MD1usQedoWN5XjNqdYag6A=
Expand Down
11 changes: 6 additions & 5 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
//
// Example:
//
// // conventional plain-text log
// log.Infof("uploading %s for %s", filename, user)
// log.Warnf("upload failed %s for %s: %s", filename, user, err)
// // conventional plain-text log
// log.Infof("uploading %s for %s", filename, user)
// log.Warnf("upload failed %s for %s: %s", filename, user, err)
//
// // structured logging
// // structured logging
// log.Info("uploading", "file", filename, "user", user)
// log.Warn("upload failed", "file", filename, "user", user, "error", err)
//
Expand Down Expand Up @@ -63,7 +63,8 @@ func NewLumberjackLogger(c *LumberjackConfig) *lumberjack.Logger {
}
}

// Log is the logger wrapping an apex Log instance
// Log provides the fundamental logging functions. It's implemented as a wrapper around the actual logger implementation
// that allows concurrency-safe modification (replacement) of the underlying logger.
type Log struct {
lw atomic.Pointer[logger]
}
Expand Down
4 changes: 0 additions & 4 deletions log_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ func (r *logRoot) sameConfig(c *Config) bool {

func (r *logRoot) setDefault(c *Config) {
r.mutex.Lock()
if r.sameConfig(c) {
r.mutex.Unlock()
return
}
defer r.mutex.Unlock()
r.setDefaultNoLock(c)
}
Expand Down

0 comments on commit d9985fd

Please sign in to comment.