MCPcopy
hub / github.com/minio/minio-go / baseLogger

Function baseLogger

functional_tests.go:145–160  ·  view source on GitHub ↗
(testName, function string, args map[string]interface{}, startTime time.Time)

Source from the content-addressed store, hash-verified

143}
144
145func baseLogger(testName, function string, args map[string]interface{}, startTime time.Time) *slog.Logger {
146 // calculate the test case duration
147 duration := time.Since(startTime)
148 // log with the fields as per mint
149 l := slog.With(
150 "name", "minio-go: "+testName,
151 "duration", duration.Nanoseconds()/1000000,
152 )
153 if function != "" {
154 l = l.With("function", function)
155 }
156 if len(args) > 0 {
157 l = l.With("args", args)
158 }
159 return l
160}
161
162// log successful test runs
163func logSuccess(testName, function string, args map[string]interface{}, startTime time.Time) {

Callers 3

logSuccessFunction · 0.85
logFailureFunction · 0.85
logIgnoredFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected