Add new event creation method to improve logging functionality.

This commit is contained in:
Jeffrey Paul 2024-05-14 04:58:31 -07:00
parent fb4424d69b
commit 1a8b2c3e4e

View File

@ -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