Add package slogd

Signed-off-by: Jan Tytgat <jan.tytgat@corelayer.eu>
This commit is contained in:
Jan Tytgat
2025-04-15 09:36:56 +02:00
parent 41bf5b86ea
commit 0efc6f033b
5 changed files with 248 additions and 0 deletions

10
pkg/slogd/jsonHandler.go Normal file
View File

@ -0,0 +1,10 @@
package slogd
import (
"io"
"log/slog"
)
func RegisterJSONHandler(w io.Writer, activate bool) {
RegisterSink(HandlerJSON, slog.NewJSONHandler(w, HandlerOptions()), activate)
}