1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Adjust verbose levels

This commit is contained in:
Nicolas Viennot 2019-08-31 16:49:07 -04:00
parent 6397e825bd
commit ebbafd794f
3 changed files with 11 additions and 10 deletions

View File

@ -433,8 +433,8 @@ static void tmate_spawn_daemon(struct tmate_session *session)
set_session_token(session, token); set_session_token(session, token);
free(token); free(token);
tmate_notice("Spawning daemon for %s at %s (%s)", tmate_info("Spawning daemon for %s at %s (%s)",
client->username, client->ip_address, client->pubkey); client->username, client->ip_address, client->pubkey);
session->tmux_socket_fd = server_create_socket(); session->tmux_socket_fd = server_create_socket();
if (session->tmux_socket_fd < 0) if (session->tmux_socket_fd < 0)
@ -483,8 +483,8 @@ static void tmate_spawn_pty_client(struct tmate_session *session)
set_session_token(session, token); set_session_token(session, token);
tmate_notice("Spawning pty client for %s (%s)", tmate_info("Spawning pty client for %s (%s)",
client->ip_address, client->pubkey); client->ip_address, client->pubkey);
session->tmux_socket_fd = client_connect(session->ev_base, socket_path, 0); session->tmux_socket_fd = client_connect(session->ev_base, socket_path, 0);
if (session->tmux_socket_fd < 0) { if (session->tmux_socket_fd < 0) {

View File

@ -215,7 +215,8 @@ static void register_on_ssh_read(struct tmate_ssh_client *client)
static void handle_sigalrm(__unused int sig) static void handle_sigalrm(__unused int sig)
{ {
tmate_fatal("Connection grace period (%d) passed", TMATE_SSH_GRACE_PERIOD); tmate_debug("Connection grace period (%ds) passed", TMATE_SSH_GRACE_PERIOD);
exit(1);
} }
static void client_bootstrap(struct tmate_session *_session) static void client_bootstrap(struct tmate_session *_session)
@ -225,7 +226,7 @@ static void client_bootstrap(struct tmate_session *_session)
ssh_event mainloop; ssh_event mainloop;
ssh_session session = client->session; ssh_session session = client->session;
tmate_notice("Bootstrapping ssh client ip=%s", client->ip_address); tmate_info("Bootstrapping ssh client ip=%s", client->ip_address);
_session->ev_base = osdep_event_init(); _session->ev_base = osdep_event_init();
@ -255,7 +256,7 @@ static void client_bootstrap(struct tmate_session *_session)
ssh_set_auth_methods(client->session, SSH_AUTH_METHOD_PUBLICKEY); ssh_set_auth_methods(client->session, SSH_AUTH_METHOD_PUBLICKEY);
tmate_info("Exchanging DH keys"); tmate_debug("Exchanging DH keys");
if (ssh_handle_key_exchange(session) < 0) if (ssh_handle_key_exchange(session) < 0)
tmate_fatal("Error doing the key exchange: %s", tmate_fatal("Error doing the key exchange: %s",
ssh_get_error(session)); ssh_get_error(session));

View File

@ -212,7 +212,7 @@ void tmate_websocket_exec(struct tmate_session *session, const char *command)
void tmate_notify_client_join(__unused struct tmate_session *session, void tmate_notify_client_join(__unused struct tmate_session *session,
struct client *c) struct client *c)
{ {
tmate_notice("Client joined (cid=%d)", c->id); tmate_info("Client joined (cid=%d)", c->id);
if (!tmate_has_websocket()) if (!tmate_has_websocket())
return; return;
@ -230,7 +230,7 @@ void tmate_notify_client_join(__unused struct tmate_session *session,
void tmate_notify_client_left(__unused struct tmate_session *session, void tmate_notify_client_left(__unused struct tmate_session *session,
struct client *c) struct client *c)
{ {
tmate_notice("Client left (cid=%d)", c->id); tmate_info("Client left (cid=%d)", c->id);
if (!tmate_has_websocket()) if (!tmate_has_websocket())
return; return;
@ -416,7 +416,7 @@ static int _tmate_connect_to_websocket(const char *hostname, int port)
if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0) if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0)
tmate_fatal("Can't set websocket server socket to non-blocking"); tmate_fatal("Can't set websocket server socket to non-blocking");
tmate_notice("Connected to websocket server at %s:%d", hostname, port); tmate_info("Connected to websocket server at %s:%d", hostname, port);
return sockfd; return sockfd;
} }