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

Debugging output is useless #209

Open
Alexander-- opened this issue Nov 25, 2023 · 1 comment
Open

Debugging output is useless #209

Alexander-- opened this issue Nov 25, 2023 · 1 comment

Comments

@Alexander--
Copy link

When using '-vvvv' option of websocat, output rarely contains useful details. There are lots of odd messages, such as

[DEBUG websocat::readdebt] Fullfulling the debt of 135 bytes
[DEBUG websocat::trivial_peer] LiteralPeer debt
[DEBUG websocat::trivial_peer] LiteralPeer finished
[DEBUG websocat::my_copy] zero len
[DEBUG websocat::my_copy] read_done
[DEBUG websocat::my_copy] done

none of which confer actual information unless you are the websocat developer.

But when the process crashes or returns error to client, there are only extremely succinct log messages such as

websocat: WebSocketError: I/O failure

↑ the above message is displayed when websocat, launched with most verbose options (-vvvv), rejects a client in #208.

Other libraries, such as python-websockets default to logging a full stacktrace each time they reject client. Websocat is written in Rust, so I don't expect it, but it would be nice to at least log major decisions, happening inside the code.

@vi
Copy link
Owner

vi commented Nov 25, 2023

I'm not sure specifically backtrace can be helpful when debugging when the client is rejected.

INFO mode (i.e. one -v) is indented to produce logs based on "major decisious", such as Websocat startup or acceptance of the connection.

Unfortunately, current version of Websocat is based on rather crude and unmaintained library and new design for Websocat is far away (and logs tend to become cluttered there as well).


How log messages should look like per you idea? Can you provide imaginary transcript of what the logs should have looked like?

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