server: misc changes for traces
This commit is contained in:
@@ -91,9 +91,9 @@ pub async fn handle_command(
|
||||
}
|
||||
|
||||
if auto_detected_systemd_mode {
|
||||
tracing::info!("Running in systemd mode, auto-detected");
|
||||
tracing::debug!("Running in systemd mode, auto-detected");
|
||||
} else {
|
||||
tracing::info!("Running in systemd mode");
|
||||
tracing::debug!("Running in systemd mode");
|
||||
}
|
||||
} else {
|
||||
let subscriber = tracing_subscriber::Registry::default()
|
||||
@@ -111,7 +111,7 @@ pub async fn handle_command(
|
||||
|
||||
trace_server_prelude();
|
||||
|
||||
tracing::info!("Running in standalone mode");
|
||||
tracing::debug!("Running in standalone mode");
|
||||
}
|
||||
|
||||
let config_path = config_path.unwrap_or_else(|| PathBuf::from(DEFAULT_CONFIG_PATH));
|
||||
|
||||
@@ -77,7 +77,13 @@ pub async fn session_handler(
|
||||
}
|
||||
};
|
||||
|
||||
session_handler_with_unix_user(socket, &unix_user, db_pool).await
|
||||
tracing::info!("Accepted connection from user: {}", unix_user);
|
||||
|
||||
let result = session_handler_with_unix_user(socket, &unix_user, db_pool).await;
|
||||
|
||||
tracing::info!("Finished handling requests for connection from user: {}", unix_user);
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
pub async fn session_handler_with_unix_user(
|
||||
@@ -143,7 +149,12 @@ async fn session_handler_with_db_connection(
|
||||
}
|
||||
request => request.to_owned(),
|
||||
};
|
||||
tracing::info!("Received request: {:#?}", request_to_display);
|
||||
|
||||
if request_to_display != Request::Exit {
|
||||
tracing::info!("Received request: {:#?}", request_to_display);
|
||||
} else {
|
||||
tracing::debug!("Received request: {:#?}", request_to_display);
|
||||
}
|
||||
|
||||
let response = match request {
|
||||
Request::CheckAuthorization(dbs_or_users) => {
|
||||
@@ -237,7 +248,7 @@ async fn session_handler_with_db_connection(
|
||||
}
|
||||
response => response.to_owned(),
|
||||
};
|
||||
tracing::info!("Response: {:#?}", response_to_display);
|
||||
tracing::debug!("Response: {:#?}", response_to_display);
|
||||
|
||||
stream.send(response).await?;
|
||||
stream.flush().await?;
|
||||
|
||||
Reference in New Issue
Block a user