Compare commits

..

No commits in common. "master" and "v0.0.10" have entirely different histories.

3 changed files with 4 additions and 21 deletions

8
go.mod
View File

@ -4,10 +4,6 @@ go 1.13
require (
github.com/ehlxr/lumberjack v0.0.2-0.20200107093220-2a579f1b2e4d
github.com/robfig/cron/v3 v3.0.1
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.16.0
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect
golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee // indirect
honnef.co/go/tools v0.1.0 // indirect
github.com/robfig/cron/v3 v3.0.0
go.uber.org/zap v1.12.0
)

View File

@ -1,10 +1,9 @@
package log
import (
"go.uber.org/zap"
"testing"
"time"
"go.uber.org/zap"
)
func TestLog(t *testing.T) {
@ -31,18 +30,6 @@ func TestLogWithConfig(t *testing.T) {
// Panicf("this is %s message", "panic")
}
func TestLogWithNew(t *testing.T) {
config := NewLogConfig()
_ = config.Level.Set("debug")
config.Name = "main"
logger := config.New()
log := With(logger, "traceid", float64(21221212122), "request", "[POST]/hello/v2")
log.Debugf("this is %s message", "debug")
log.Infof("this is %s message", "info")
}
func TestLogRote(t *testing.T) {
lc := NewLogConfig()
lc.MaxSize = 1

View File

@ -1 +1 @@
v0.0.11
v0.0.10