Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use structured logging #215

Open
SuperQ opened this issue Mar 1, 2025 · 3 comments
Open

Use structured logging #215

SuperQ opened this issue Mar 1, 2025 · 3 comments

Comments

@SuperQ
Copy link
Contributor

SuperQ commented Mar 1, 2025

It would be nice to switch the logging from basic Go log to the new log/slog package. This would allow for both logfmt and json formatted logs. Having structured key=value logs is nicer to read than fmt.Sprintf() strings.

Also, it would be good to cleanup any use of fmt.Print(f|ln).

@SuperQ
Copy link
Contributor Author

SuperQ commented Mar 1, 2025

It seems like github.com/pion/logging is the current main logging library. It does not support structured logs.

@Nevexo
Copy link
Contributor

Nevexo commented Mar 1, 2025

It'd also be nice in the future to be able to stream logs to syslog etc.

@SuperQ
Copy link
Contributor Author

SuperQ commented Mar 1, 2025

I think syslog and related would be something we would need to file against the system distro (https://github.com/jetkvm/rv1106-system).

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

No branches or pull requests

2 participants