Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Send library logs to server logger #42

Open
bbkane opened this issue Dec 30, 2023 · 0 comments
Open

Send library logs to server logger #42

bbkane opened this issue Dec 30, 2023 · 0 comments

Comments

@bbkane
Copy link
Owner

bbkane commented Dec 30, 2023

$ 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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant