Add new event creation method to improve logging functionality.
This commit is contained in:
parent
fb4424d69b
commit
1a8b2c3e4e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue