-
Notifications
You must be signed in to change notification settings - Fork 283
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
pagination issue in verbose mode #278
Comments
Maybe redirect the logs away from the terminal? The terminal seems to be in raw mode and not converting Maybe you can do something like The problem is not with the terminal emulator (such as gnome-terminal or terminator), but with tty Line discipline. |
Dear @vi Thanks for answer. So I could not use I was asking if something like exit_on_specific_byte was existing to handle this case when verbose debug mode is enable and terminal is in raw mode. I want to say an option like : --log-raw-ldisc and when set, Thanks again for help |
Maybe just redirect logs away from the terminal, to a separate file/socket; then maybe view that file/socket in a separate terminal? For example, use |
Dear @vi |
Dear @vi Thanks again for answer and help ! Here are multiple points to concider in this issue : Since I open this case and according to your suggestions , I made a lot of tests to try to redirect the debug outut to a new file descriptor (to be able to interpret correctly \r\n from this fd in terminal). mkfifo /dev/shm/fbxfifo
exec 3>&-
exec 3<>/dev/shm/fbxfifo
CR=$(echo -en "\r")
while read <&3; do echo -e "\r${REPLY//$CR/}"; done &
tput init; stty raw -echo; SSL_CERT_FILE=/dev/shm/fbx-cacert-ws websocat -H "X-Fbx-App-Auth: $_SESSION_TOKEN" --origin https://fbx.fbx.lan --protocol "chat, superchat" -v -E --binary --ping-interval 10 --byte-to-exit-on 11 exit_on_specific_byte:stdio: exit_on_specific_byte:wss://fbx.fbx.lan/api/v12/vm/2/console 2>/dev/shm/fbxfifo; stty sane cooked; tput init
kill $! but a Maybe I missed something but with file descriptors I wasn't able to have this debug output in the current terminal which is (and must be) in raw mode [DEBUG websocat::readdebt] Fulfilling the debt of 1 bytes
l[DEBUG websocat::ws_peer] incoming binary
[DEBUG websocat::readdebt] Fulfilling the debt of 1 bytes
o[DEBUG websocat::ws_peer] incoming binary
[DEBUG websocat::readdebt] Fulfilling the debt of 1 bytes
g[DEBUG websocat::ws_peer] incoming binary
[DEBUG websocat::readdebt] Fulfilling the debt of 1 bytes
i[DEBUG websocat::ws_peer] incoming binary
[DEBUG websocat::readdebt] Fulfilling the debt of 1 bytes
n[DEBUG websocat::ws_peer] incoming binary
[DEBUG websocat::readdebt] Fulfilling the debt of 1 bytes
:[DEBUG websocat::ws_peer] incoming binary
[DEBUG websocat::readdebt] Fulfilling the debt of 1 bytes
[INFO websocat::ws_peer] Sending WebSocket ping
[INFO websocat::ws_peer] Received a pong from websocket; RTT = 763.972µs
[INFO websocat::trivial_peer] Special byte detected. Triggering EOF.
[DEBUG websocat::my_copy] zero len
[DEBUG websocat::my_copy] read_done
[DEBUG websocat::my_copy] done
[INFO websocat::sessionserve] Forward finished
[DEBUG websocat::sessionserve] Forward shutdown finished
[DEBUG websocat::ws_peer] drop WsWriteWrapper
[INFO websocat::sessionserve] One of directions finished
... I think I will have a deeper look at Thanks again for help |
Is Websocat logs only a part of debugging suite or those logs are expected to be visible to actual users of those "industrial terminals"? Maybe it is worth to promote some specific log messages into e.g. script runs, so you can fine tune how exactly things are printed? Mixing content and logs is a poor idea in general and doubly poor when direct control of terminal is assumed. Is there a list of relevant log messages you are actually looking for; or you are setting up flexible debuggability to be able to solve new issues later? Maybe in the end it should be a dedicated connector tool that supports features you need the way you need? Websocat is fine for prototyping and debugging, but may be non-ideal fit for production. |
Dear @vi Thanks again for answer and help. I think stty raw -echo ; websocat ... ; stty sane cooked This expression of stty make the job : stty raw inlcr -igncr opost -echo ; websocat ... ; stty sane cooked Arrows in [INFO websocat::stdio_threaded_peer] get_stdio_peer (threaded)
[INFO websocat::ws_client_peer] get_ws_client_peer
[INFO websocat::net_peer] Connected to TCP 10.0.100.10:443
[INFO websocat::ws_client_peer] Connected to ws
[INFO websocat::ws_peer] Sending WebSocket ping
[INFO websocat::ws_peer] Received a pong from websocket; RTT = 742.603µs
[INFO websocat::ws_peer] Sending WebSocket ping
[INFO websocat::ws_peer] Received a pong from websocket; RTT = 723.372µs
...
[INFO websocat::trivial_peer] Special byte detected. Triggering EOF.
[INFO websocat::sessionserve] Forward finished
[INFO websocat::sessionserve] One of directions finished
Last thing but it can be due to the websocket server itself (or maybe websocat), after connecting a remote qemu VM console over websocket (with terminal in raw mode) and using v () { /usr/bin/vim $*;tput init; } && alias vi="v $*" not very clean but usefull Thanks again for time and help |
Dear Vi
Is there a way that verbose mode ('-vv') send log in a more readable maner ?
(terminator + xterm-256colors)
Or (gnome terminal + xterm-256colors)
I would expect something more readable like :
Thanks for help
Kind regards
nabnba
The text was updated successfully, but these errors were encountered: