bbkane / shovel

Explore complex DNS records by making and aggregating DNS requests
MIT License
6 stars 0 forks source link

Send library logs to server logger #42

Open bbkane opened 8 months ago

bbkane commented 8 months ago
$ go run . serve | format_jsonl.py fmt

---
line: ⇨ http server started on 127.0.0.1:8080
2023/12/30 14:11:39 traces export: Post "http://127.0.0.1:5080/api/default/traces": dial tcp 127.0.0.1:5080: connect: connection refused

That second line comes from the otel libraries logging using the log library. I need to redirect that to the server JSON logs, exactly like https://caddyserver.com/docs/json/logging/sink/ . I could look up how that works or how https://pkg.go.dev/golang.org/x/exp/slog#SetDefault works