caddy-log-exporter/internal/logger/logger.go

17 lines
229 B
Go
Raw Permalink Normal View History

2024-09-19 11:21:05 +02:00
package logger
import (
"log/slog"
"os"
"github.com/phsym/console-slog"
)
func Setup() {
logger := slog.New(
console.NewHandler(os.Stderr, &console.HandlerOptions{Level: slog.LevelDebug}),
)
slog.SetDefault(logger)
}