{"record":{"id":"b64f49f90628f077","repo":"sirupsen/logrus","slug":"not-a-valid-logrus-level-q","errorCode":null,"errorMessage":"not a valid logrus Level: %q","messagePattern":"not a valid logrus Level: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"logrus.go","lineNumber":62,"sourceCode":"func parseLevel(b []byte) (Level, error) {\n\tswitch {\n\tcase bytes.EqualFold(b, []byte(\"panic\")):\n\t\treturn PanicLevel, nil\n\tcase bytes.EqualFold(b, []byte(\"fatal\")):\n\t\treturn FatalLevel, nil\n\tcase bytes.EqualFold(b, []byte(\"error\")):\n\t\treturn ErrorLevel, nil\n\tcase bytes.EqualFold(b, []byte(\"warn\")),\n\t\tbytes.EqualFold(b, []byte(\"warning\")):\n\t\treturn WarnLevel, nil\n\tcase bytes.EqualFold(b, []byte(\"info\")):\n\t\treturn InfoLevel, nil\n\tcase bytes.EqualFold(b, []byte(\"debug\")):\n\t\treturn DebugLevel, nil\n\tcase bytes.EqualFold(b, []byte(\"trace\")):\n\t\treturn TraceLevel, nil\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"not a valid logrus Level: %q\", b)\n\t}\n}\n\n// UnmarshalText implements encoding.TextUnmarshaler.\nfunc (level *Level) UnmarshalText(text []byte) error {\n\tl, err := parseLevel(text)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t*level = l\n\n\treturn nil\n}\n\nfunc (level Level) MarshalText() ([]byte, error) {\n\tswitch level {\n\tcase TraceLevel, DebugLevel, InfoLevel, WarnLevel, ErrorLevel, FatalLevel, PanicLevel:","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/sirupsen/logrus/blob/457e372460c7a80ca7c800b51ebeee5362aaa180/logrus.go#L44-L80","documentation":"Error \"not a valid logrus Level: %q\" thrown in sirupsen/logrus.","triggerScenarios":"Thrown at logrus.go:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"457e372460c7a80ca7c800b51ebeee5362aaa180","analyzedAt":"2026-08-16T02:52:47.002Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}