first commit
This commit is contained in:
23
core/mcp/codemode/starlark/init.go
Normal file
23
core/mcp/codemode/starlark/init.go
Normal file
@@ -0,0 +1,23 @@
|
||||
//go:build !tinygo && !wasm
|
||||
|
||||
package starlark
|
||||
|
||||
import "github.com/maximhq/bifrost/core/schemas"
|
||||
|
||||
// noopLogger is a no-op implementation of schemas.Logger used as a fallback
|
||||
// when no logger is provided.
|
||||
type noopLogger struct{}
|
||||
|
||||
func (noopLogger) Debug(string, ...any) {}
|
||||
func (noopLogger) Info(string, ...any) {}
|
||||
func (noopLogger) Warn(string, ...any) {}
|
||||
func (noopLogger) Error(string, ...any) {}
|
||||
func (noopLogger) Fatal(string, ...any) {}
|
||||
func (noopLogger) SetLevel(schemas.LogLevel) {}
|
||||
func (noopLogger) SetOutputType(schemas.LoggerOutputType) {}
|
||||
func (noopLogger) LogHTTPRequest(schemas.LogLevel, string) schemas.LogEventBuilder {
|
||||
return schemas.NoopLogEvent
|
||||
}
|
||||
|
||||
// defaultLogger is used when nil is passed to NewStarlarkCodeMode.
|
||||
var defaultLogger schemas.Logger = noopLogger{}
|
||||
Reference in New Issue
Block a user