MCPcopy Create free account
hub / github.com/Mister-leo/fssh / should

Function should

internal/log/log.go:28–36  ·  view source on GitHub ↗
(l string)

Source from the content-addressed store, hash-verified

26func Error(msg string, fields map[string]interface{}) { out("error", msg, fields) }
27
28func should(l string) bool {
29 switch level {
30 case "debug": return true
31 case "info": return l != "debug"
32 case "warn": return l == "warn" || l == "error"
33 case "error": return l == "error"
34 default: return true
35 }
36}
37
38func out(l, msg string, fields map[string]interface{}) {
39 ts := time.Now().Format(timefmt)

Callers 3

DebugFunction · 0.85
InfoFunction · 0.85
WarnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected