From 97f466e03fb0cd5437117f67998d4ce73b5dddbd Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 14 May 2024 04:58:39 -0700 Subject: [PATCH] Refactored Log method to Handle method for processing records in RELPHandler. --- relp_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relp_handler.go b/relp_handler.go index 1eecea9..4ec2934 100644 --- a/relp_handler.go +++ b/relp_handler.go @@ -115,8 +115,8 @@ func (r *RELPHandler) Startup() error { return nil } -func (r *RELPHandler) Log(level slog.Level, message string, data ...slog.Field) error { - event := NewEvent(level.String(), message, data) +func (r *RELPHandler) Handle(ctx context.Context, record slog.Record) error { + event := NewEvent(record.Level.String(), record.Message, record.Attrs) select { case r.ch <- event: return nil // Successfully sent event to channel