Add run-time flags to aid development
To aid development, it may be useful to be able to have more informative output without recompiling the code. A simple example for such a flag is the OpenSSH client -v
flag: One or more flags can be passed on the command line (i.e., -v
, -vv
, and so on) making OpenSSH print increasingly more information.
Below you can find example SSH output when logging out.
Command: ssh remote
$ logout
Connection to remote closed.
Command: ssh -v remote
$ logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to remote closed.
Transferred: sent 2968, received 3132 bytes, in 0.8 seconds
Bytes per second: sent 3563.3, received 3760.2
debug1: Exit status 0
Command: ssh -vv remote
$ logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to remote closed.
Transferred: sent 3020, received 3240 bytes, in 2.4 seconds
Bytes per second: sent 1275.8, received 1368.8
debug1: Exit status 0