From 1a8b2c3e4ef96261e55c7fedd7b558a364a462c0 Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 14 May 2024 04:58:31 -0700 Subject: [PATCH] Add new event creation method to improve logging functionality. --- relp_handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/relp_handler.go b/relp_handler.go index 7542617..1eecea9 100644 --- a/relp_handler.go +++ b/relp_handler.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "log" + "log/slog" "net" "net/url" "os" @@ -115,7 +116,7 @@ func (r *RELPHandler) Startup() error { } func (r *RELPHandler) Log(level slog.Level, message string, data ...slog.Field) error { - event := simplelog.NewEvent(level.String(), message, data) + event := NewEvent(level.String(), message, data) select { case r.ch <- event: return nil // Successfully sent event to channel