From 4f2743e1e8d40040ee0f3d9392bb7384576bf027 Mon Sep 17 00:00:00 2001 From: gayanyapa Date: Sun, 8 Sep 2024 18:53:03 +0930 Subject: [PATCH 1/3] Context Map Extractor Added(WithCtxMapExtractor) Dependencies upgraded --- definitions.go | 12 +++---- example/json_logger/main.go | 12 ++++--- example/text_logger/main.go | 2 ++ go.mod | 6 ++-- go.sum | 18 ++++++++++ json_bench_test.go | 67 ++++++++++++++++++++++++++++++++++--- json_parser.go | 7 +++- options.go | 25 ++++++++++++-- 8 files changed, 128 insertions(+), 21 deletions(-) diff --git a/definitions.go b/definitions.go index 4713b58..7003f44 100644 --- a/definitions.go +++ b/definitions.go @@ -22,12 +22,12 @@ const ( ) var logColors = map[Level]string{ - FATAL: aurora.BgRed(`[FATAL]`).String(), - ERROR: aurora.BgRed(`[ERROR]`).String(), - WARN: aurora.BgYellow(`[ WARN]`).String(), - INFO: aurora.BgBlue(`[ INFO]`).String(), - DEBUG: aurora.BgCyan(`[DEBUG]`).String(), - TRACE: aurora.BgMagenta(`[TRACE]`).String(), + FATAL: aurora.Red(`FATAL`).String(), + ERROR: aurora.Red(`ERROR`).String(), + WARN: aurora.Yellow(`WARN `).String(), + INFO: aurora.Blue(`INFO `).String(), + DEBUG: aurora.Cyan(`DEBUG`).String(), + TRACE: aurora.Magenta(`TRACE`).String(), } var logTypes = map[Level]int{ diff --git a/example/json_logger/main.go b/example/json_logger/main.go index f35f612..1da1e16 100644 --- a/example/json_logger/main.go +++ b/example/json_logger/main.go @@ -82,11 +82,8 @@ func main() { // enable context reading // keys - type keyOne string - type keyTwo string - - const k1 keyOne = "key1" - const k2 keyTwo = "key2" + const k1 string = "key1" + const k2 string = "key2" // get details from context lCtx := context.Background() @@ -115,6 +112,11 @@ func main() { fmt.Sprintf("%s: %+v", k2, ctx.Value(k2)), } }), + log.WithCtxMapExtractor(func(ctx context.Context) map[string]string { + return map[string]string{ + k2: ctx.Value(k2).(string), + } + }), ) ctxChildLogger.ErrorContext(lCtx, "message", "param1", "param2") diff --git a/example/text_logger/main.go b/example/text_logger/main.go index ee4e1b1..4e3243a 100644 --- a/example/text_logger/main.go +++ b/example/text_logger/main.go @@ -118,4 +118,6 @@ func main() { ctxChildLogger.ErrorContext(lCtx, `message`) ctxChildLogger.ErrorContext(lCtx, log.WithPrefix(`prefix`, `message`)) ctxChildLogger.WarnContext(lCtx, log.WithPrefix(`prefix`, `message`), `param1`, `param2`) + ctxChildLogger.Println(`param1`, `param2`) + ctxChildLogger.Print(`param1`, `param2`) } diff --git a/go.mod b/go.mod index 0992e7c..cb0cfdb 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/tryfix/log go 1.14 require ( - github.com/google/uuid v1.1.1 - github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 - github.com/rs/zerolog v1.22.0 + github.com/google/uuid v1.6.0 + github.com/logrusorgru/aurora v2.0.3+incompatible + github.com/rs/zerolog v1.33.0 github.com/tryfix/traceable-context v1.0.1 ) diff --git a/go.sum b/go.sum index e76e0c4..d494510 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,26 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 h1:bqDmpDG49ZRnB5PcgP0RXtQvnMSgIF14M7CBd2shtXs= github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= +github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.22.0 h1:XrVUjV4K+izZpKXZHlPrYQiDtmdGiCylnT4i43AAWxg= github.com/rs/zerolog v1.22.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/tryfix/traceable-context v1.0.1 h1:BNAx5NzCi2oEhvLXR4WxtUc5bCIv7PClLCWgGh33kDg= github.com/tryfix/traceable-context v1.0.1/go.mod h1:yXNt6rINIlKZDYQuZnVFfZhjTDSQXryhC8KM5vuP6Vw= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -23,6 +37,10 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/json_bench_test.go b/json_bench_test.go index 80161bc..81f75ac 100644 --- a/json_bench_test.go +++ b/json_bench_test.go @@ -2,6 +2,7 @@ package log_test import ( "context" + "fmt" "io/ioutil" "testing" @@ -18,6 +19,7 @@ func BenchmarkZLBaseline(b *testing.B) { Logger() var msg interface{} = "message" b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { logger.Error().Msgf("%s", msg) @@ -35,6 +37,7 @@ func BenchmarkZLBaselineWithCaller(b *testing.B) { Logger() var msg interface{} = "message" b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { logger.Error().Msgf("%s", msg) @@ -51,6 +54,7 @@ func BenchmarkJsonPrint(b *testing.B) { log.WithLevel(log.DEBUG), ) b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { logger.Print("message") @@ -85,6 +89,7 @@ func BenchmarkJsonLoggers(b *testing.B) { b.Run(c.name, func(b *testing.B) { logger := baseLogger.Log(c.cfs...) b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { logger.Error("message") @@ -102,6 +107,7 @@ func BenchmarkJsonLogInfo(b *testing.B) { log.WithFilePath(false), log.WithColors(false)).Log() b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { lg.Info(testLog) @@ -117,6 +123,7 @@ func BenchmarkJsonLogInfoFilePath(b *testing.B) { log.WithFilePath(true), log.WithColors(false)).Log() b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { lg.Info(testLog) @@ -133,6 +140,7 @@ func BenchmarkJsonInfoContext(b *testing.B) { log.WithColors(false)).Log() ctx := context.Background() b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { lg.InfoContext(ctx, testLog) @@ -141,22 +149,72 @@ func BenchmarkJsonInfoContext(b *testing.B) { } func BenchmarkJsonInfoContextExt(b *testing.B) { - ctx1 := context.WithValue(context.Background(), `ctx1`, `ctx one value`) - ctx2 := context.WithValue(ctx1, `ctx2`, `ctx two value`) + ctx1 := context.WithValue(context.Background(), `ctx1`, `ctx 1 value`) + for i := 2; i <= 10; i++ { + ctx1 = context.WithValue(ctx1, fmt.Sprintf(`ctx%d`, i), fmt.Sprintf(`ctx %d value`, i)) + } lg := log.NewLog( log.WithLevel(log.INFO), log.WithStdOut(ioutil.Discard), log.WithFilePath(false), log.WithOutput(log.OutJson), log.WithCtxExtractor(func(ctx context.Context) []interface{} { - return []interface{}{ctx.Value(`ctx1`), ctx.Value(`ctx2`)} + return []interface{}{ + "ctx1: " + ctx.Value(`ctx1`).(string), + "ctx2: " + ctx.Value(`ctx2`).(string), + "ctx3: " + ctx.Value(`ctx3`).(string), + "ctx4: " + ctx.Value(`ctx4`).(string), + "ctx5: " + ctx.Value(`ctx5`).(string), + "ctx6: " + ctx.Value(`ctx6`).(string), + "ctx7: " + ctx.Value(`ctx7`).(string), + "ctx8: " + ctx.Value(`ctx8`).(string), + "ctx9: " + ctx.Value(`ctx9`).(string), + "ctx10: " + ctx.Value(`ctx10`).(string), + } + }), + log.WithColors(false)).Log() + + b.ResetTimer() + b.ReportAllocs() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + lg.InfoContext(ctx1, testLog) + } + }) +} + +func BenchmarkJsonInfoContextMapExt(b *testing.B) { + ctx1 := context.WithValue(context.Background(), `ctx1`, `ctx 1 value`) + for i := 2; i <= 10; i++ { + ctx1 = context.WithValue(ctx1, fmt.Sprintf(`ctx%d`, i), fmt.Sprintf(`ctx %d value`, i)) + } + + lg := log.NewLog( + log.WithLevel(log.INFO), + log.WithStdOut(ioutil.Discard), + log.WithFilePath(false), + log.WithOutput(log.OutJson), + log.WithCtxMapExtractor(func(ctx context.Context) map[string]string { + return map[string]string{ + `ctx1`: ctx.Value(`ctx1`).(string), + `ctx2`: ctx.Value(`ctx2`).(string), + `ctx3`: ctx.Value(`ctx3`).(string), + `ctx4`: ctx.Value(`ctx4`).(string), + `ctx5`: ctx.Value(`ctx5`).(string), + `ctx6`: ctx.Value(`ctx6`).(string), + `ctx7`: ctx.Value(`ctx7`).(string), + `ctx8`: ctx.Value(`ctx8`).(string), + `ctx9`: ctx.Value(`ctx9`).(string), + `ctx10`: ctx.Value(`ctx10`).(string), + } }), log.WithColors(false)).Log() b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { - lg.InfoContext(ctx2, testLog) + lg.InfoContext(ctx1, testLog) } }) } @@ -170,6 +228,7 @@ func BenchmarkJsonInfoParams(b *testing.B) { log.WithColors(false)).Log() ctx := context.Background() b.ResetTimer() + b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { lg.InfoContext(ctx, testLog, `parm1`, `parm2`, `parm3`, `parm4`) diff --git a/json_parser.go b/json_parser.go index 0b5bfc5..22bd1a1 100644 --- a/json_parser.go +++ b/json_parser.go @@ -77,7 +77,12 @@ func (l *jsonLogParser) withExtractedTrace(ctx context.Context, event *zerolog.E func (l *jsonLogParser) withExtractedCtx(ctx context.Context, event *zerolog.Event) *zerolog.Event { if l.ctxExt != nil { if ctxData := l.ctxExt(ctx); len(ctxData) > 0 { - return event.Interface("context", ctxData) + event.Interface("context", ctxData) + } + } + if l.ctxMapExt != nil { + if ctxData := l.ctxMapExt(ctx); len(ctxData) > 0 { + event.Interface("contextMap", ctxData) } } diff --git a/options.go b/options.go index 83cb4e9..d90759c 100644 --- a/options.go +++ b/options.go @@ -22,6 +22,7 @@ type logOptions struct { writer io.Writer output Output ctxExt func(ctx context.Context) []interface{} + ctxMapExt func(ctx context.Context) map[string]string ctxTraceExt func(ctx context.Context) string } @@ -98,7 +99,7 @@ func WithFilePath(enabled bool) Option { } } -// WithFilePath sets whether the file path is logged or not. +// WithFuncPath sets whether the func path is logged or not. func WithFuncPath(enabled bool) Option { return func(opts *logOptions) { opts.funcPath = enabled @@ -132,7 +133,9 @@ func WithLevel(level Level) Option { } } -// WithCtxExtractor allows setting up of a function to extract values from the context. +// Deprecated: use WithCtxMapExtractor instead. +// +// WithCtxExtractor allows setting up a function to extract values from the context as an array. func WithCtxExtractor(fn func(ctx context.Context) []interface{}) Option { return func(opts *logOptions) { parent := opts.ctxExt @@ -146,6 +149,24 @@ func WithCtxExtractor(fn func(ctx context.Context) []interface{}) Option { } } +// WithCtxMapExtractor allows setting up a function to extract values from the context as a key:value map. +func WithCtxMapExtractor(fn func(ctx context.Context) map[string]string) Option { + return func(opts *logOptions) { + parentExt := opts.ctxMapExt + opts.ctxMapExt = func(ctx context.Context) map[string]string { + if parentExt != nil { + parentMap := parentExt(ctx) + for key, val := range fn(ctx) { + parentMap[key] = val + } + return parentMap + } + + return fn(ctx) + } + } +} + // WithCtxTraceExtractor allows setting up of a function to extract trace from the context. // Default value func(_ context.Context) string{return ""} func WithCtxTraceExtractor(fn func(ctx context.Context) string) Option { From 8b0c8d1361ba958cfd453be104f6023f4f12ab4d Mon Sep 17 00:00:00 2001 From: gayanyapa Date: Mon, 9 Sep 2024 11:09:38 +0930 Subject: [PATCH 2/3] TextLogger CtxMap params added --- example/text_logger/main.go | 25 +++++++++---------------- text_parser.go | 8 +++++++- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/example/text_logger/main.go b/example/text_logger/main.go index 4e3243a..b1dd4b8 100644 --- a/example/text_logger/main.go +++ b/example/text_logger/main.go @@ -65,22 +65,10 @@ func main() { prefixedLogger.Error(`module.sub-module`, `message`) prefixedLogger.Error(`module.sub-module`, `message`, `param1`, `param2`) - // custom logger - //customLogger := customLog.NewLogger() - //customLogger.Info(`info`) - //customLogger.Trace(`trace`) - // - //// create a logger instance derived from logger - //nestedLogger := logger.NewLog(log.WithLevel(log.TRACE), log.Prefixed(`level-2`)) - //nestedLogger.Error(`error happened`, 22) - // enable context reading // keys - type keyOne string - type keyTwo string - - const k1 keyOne = "key1" - const k2 keyTwo = "key2" + const k1 = "key1" + const k2 = "key2" // get details from context lCtx := context.Background() @@ -96,11 +84,16 @@ func main() { fmt.Sprintf("%s: %+v", k1, ctx.Value(k1)), } }), + log.WithCtxMapExtractor(func(ctx context.Context) map[string]string { + return map[string]string{ + k1 + `mp`: ctx.Value(k1).(string), + k2 + `mp`: ctx.Value(k2).(string), + } + }), ) - ctxLogger.ErrorContext(lCtx, `message`, `param1`, `param2`) - ctxLogger.ErrorContext(lCtx, `message`) ctxLogger.ErrorContext(lCtx, `message`) + ctxLogger.ErrorContext(lCtx, `message`, `param1`, `param2`) ctxLogger.ErrorContext(lCtx, log.WithPrefix(`prefix`, `message`)) ctxLogger.WarnContext(lCtx, log.WithPrefix(`prefix`, `message`), `param1`, `param2`) diff --git a/text_parser.go b/text_parser.go index d0f9ace..5eb364b 100644 --- a/text_parser.go +++ b/text_parser.go @@ -26,7 +26,7 @@ func (l *logParser) WithPrefix(p string, message interface{}) string { return fmt.Sprintf("%s] [%+v", p, message) } -//isLoggable checks whether it is possible to log in the given level under current configurations. +// isLoggable checks whether it is possible to log in the given level under current configurations. func (l *logParser) isLoggable(level Level) bool { return logTypes[level] <= logTypes[l.logLevel] } @@ -75,6 +75,12 @@ func (l *logParser) logEntry(ctx context.Context, level Level, message interface format += " %v" params = append(params, ctxData) } + if l.ctxMapExt != nil { + if ctxData := l.ctxMapExt(ctx); len(ctxData) > 0 { + format += " %v" + params = append(params, ctxData) + } + } } if level == FATAL { From b1793c4ad1f748b683a7a0ab1850ed9ebec0875b Mon Sep 17 00:00:00 2001 From: gayanyapa Date: Thu, 24 Oct 2024 07:30:01 +1030 Subject: [PATCH 3/3] logrusorgru/aurora version upgrade --- definitions.go | 2 +- go.mod | 2 +- go.sum | 48 +++++++++++++++++------------------------------- 3 files changed, 19 insertions(+), 33 deletions(-) diff --git a/definitions.go b/definitions.go index 7003f44..ce8979e 100644 --- a/definitions.go +++ b/definitions.go @@ -1,7 +1,7 @@ package log import ( - "github.com/logrusorgru/aurora" + "github.com/logrusorgru/aurora/v4" ) type Level string diff --git a/go.mod b/go.mod index cb0cfdb..fd6d2c0 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.14 require ( github.com/google/uuid v1.6.0 - github.com/logrusorgru/aurora v2.0.3+incompatible + github.com/logrusorgru/aurora/v4 v4.0.0 github.com/rs/zerolog v1.33.0 github.com/tryfix/traceable-context v1.0.1 ) diff --git a/go.sum b/go.sum index d494510..57ec224 100644 --- a/go.sum +++ b/go.sum @@ -1,51 +1,37 @@ -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 h1:bqDmpDG49ZRnB5PcgP0RXtQvnMSgIF14M7CBd2shtXs= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= -github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/logrusorgru/aurora/v4 v4.0.0 h1:sRjfPpun/63iADiSvGGjgA1cAYegEWMPCJdUpJYn9JA= +github.com/logrusorgru/aurora/v4 v4.0.0/go.mod h1:lP0iIa2nrnT/qoFXcOZSrZQpJ1o6n2CUf/hyHi2Q4ZQ= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.22.0 h1:XrVUjV4K+izZpKXZHlPrYQiDtmdGiCylnT4i43AAWxg= -github.com/rs/zerolog v1.22.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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= github.com/tryfix/traceable-context v1.0.1 h1:BNAx5NzCi2oEhvLXR4WxtUc5bCIv7PClLCWgGh33kDg= github.com/tryfix/traceable-context v1.0.1/go.mod h1:yXNt6rINIlKZDYQuZnVFfZhjTDSQXryhC8KM5vuP6Vw= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=