{"record":{"id":"4051be19ace441a9","repo":"googleapis/mcp-toolbox","slug":"logging-format-invalid-s","errorCode":null,"errorMessage":"logging format invalid: %s","messagePattern":"logging format invalid: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/log/log.go","lineNumber":33,"sourceCode":"package log\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"strings\"\n)\n\n// NewLogger creates a new logger based on the provided format and level.\nfunc NewLogger(format, level string, out, err io.Writer) (Logger, error) {\n\tswitch strings.ToLower(format) {\n\tcase \"json\":\n\t\treturn NewStructuredLogger(out, err, level)\n\tcase \"standard\":\n\t\treturn NewStdLogger(out, err, level)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"logging format invalid: %s\", format)\n\t}\n}\n\n// StdLogger is the standard logger\ntype StdLogger struct {\n\toutLogger *slog.Logger\n\terrLogger *slog.Logger\n}\n\n// NewStdLogger create a Logger that uses out and err for informational and error messages.\nfunc NewStdLogger(outW, errW io.Writer, logLevel string) (Logger, error) {\n\t//Set log level\n\tvar programLevel = new(slog.LevelVar)\n\tslogLevel, err := SeverityToLevel(logLevel)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tprogramLevel.Set(slogLevel)","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/log/log.go#L15-L51","documentation":"Error \"logging format invalid: %s\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/log/log.go:33 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":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}