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

Improve logging for "switched to client" message #52

Closed
h7x4 opened this issue Oct 5, 2023 · 4 comments
Closed

Improve logging for "switched to client" message #52

h7x4 opened this issue Oct 5, 2023 · 4 comments

Comments

@h7x4
Copy link

h7x4 commented Oct 5, 2023

This is mostly a usability issue, not a technical one.

Currently, I have to override RUST_LOG in order to see that the daemon detected my switch-keys and changed client. Compared to the other log messages, I believe this log message is equally important, and should be changed to a tracing::info.

Another change that would be nice, maybe the logs could use something more identifying than the client index? The hostname of the client would be optimal, but probably requires protocol changes. An alternative would be the clients IP address. It seems relatively trivial to store the address along with its mpsc sender. Not sure if this introduces any security risks though.

The relevant line:

tracing::debug!("Switched to client {}", current);

Current log output:

[INFO  rkvm_server::server] 192.168.50.230:42178: Connected
[DEBUG rustls::server::hs] decided upon suite TLS13_AES_256_GCM_SHA384
[INFO  rkvm_server::server] 192.168.50.230:42178: TLS connected
[INFO  rkvm_server::server] 192.168.50.230:42178: Authenticated successfully
[DEBUG rkvm_server::server] Switched to client 1
[DEBUG rkvm_server::server] Switched to client 0

I don't mind creating a PR if I'm given green lights!

@htrefil
Copy link
Owner

htrefil commented Oct 11, 2023

Great suggestion, fixed in 0.5.0, thanks.

@htrefil htrefil closed this as completed Oct 11, 2023
@h7x4
Copy link
Author

h7x4 commented Oct 11, 2023

Thanks! But I wasn't able to find any changes in 0.5.0, nor master. Maybe you forgot to push it?

@htrefil
Copy link
Owner

htrefil commented Oct 12, 2023

Oh yes, you're right, sorry.
I'll release 0.5.1 later today with this fixed.

@htrefil htrefil reopened this Oct 12, 2023
@htrefil
Copy link
Owner

htrefil commented Oct 12, 2023

0.5.1 released, fixed.

@htrefil htrefil closed this as completed Oct 12, 2023
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