mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-11 07:35:05 -05:00
Update internal/log/log.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -222,14 +222,14 @@ type SplitHandler struct {
|
||||
}
|
||||
|
||||
func (h *SplitHandler) Enabled(ctx context.Context, level slog.Level) bool {
|
||||
if level >= slog.LevelError {
|
||||
if level >= slog.LevelWarn {
|
||||
return h.ErrHandler.Enabled(ctx, level)
|
||||
}
|
||||
return h.OutHandler.Enabled(ctx, level)
|
||||
}
|
||||
|
||||
func (h *SplitHandler) Handle(ctx context.Context, r slog.Record) error {
|
||||
if r.Level >= slog.LevelError {
|
||||
if r.Level >= slog.LevelWarn {
|
||||
return h.ErrHandler.Handle(ctx, r)
|
||||
}
|
||||
return h.OutHandler.Handle(ctx, r)
|
||||
|
||||
Reference in New Issue
Block a user