Add slogd package back into repository

Signed-off-by: Jan Tytgat <jan.tytgat@corelayer.eu>
This commit is contained in:
Jan Tytgat
2025-04-29 22:26:20 +02:00
parent 6b1e4c60b3
commit f8121b8ada
7 changed files with 258 additions and 5 deletions

10
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)
}