MCPcopy Create free account
hub / github.com/labstack/gommon / logJSON

Method logJSON

log/log.go:352–358  ·  view source on GitHub ↗
(level Lvl, j JSON)

Source from the content-addressed store, hash-verified

350}
351
352func (l *Logger) logJSON(level Lvl, j JSON) {
353 b, err := json.Marshal(j)
354 if err != nil {
355 panic(err)
356 }
357 l.log(level, string(b), true)
358}
359
360func (l *Logger) log(level Lvl, message string, jsonBody bool) {
361 if level < l.Level() && level != 0 {

Callers 7

PrintjMethod · 0.95
DebugjMethod · 0.95
InfojMethod · 0.95
WarnjMethod · 0.95
ErrorjMethod · 0.95
FataljMethod · 0.95
PanicjMethod · 0.95

Calls 1

logMethod · 0.95

Tested by

no test coverage detected