(testName, function string, args map[string]interface{}, startTime time.Time)
| 143 | } |
| 144 | |
| 145 | func 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 |
| 163 | func logSuccess(testName, function string, args map[string]interface{}, startTime time.Time) { |
no outgoing calls
no test coverage detected