chore: decrease log level (#41)
Co-authored-by: ziyang zhang <zhangziyang@stu.cdut.edu.cn>
This commit is contained in:
parent
b3d655da31
commit
31493cfbcc
2 changed files with 4 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ where
|
||||||
};
|
};
|
||||||
// Log incoming message here before serde conversion to
|
// Log incoming message here before serde conversion to
|
||||||
// track incomplete chunks which are not valid JSON
|
// track incomplete chunks which are not valid JSON
|
||||||
tracing::info!(json = %line, "incoming message");
|
tracing::debug!(json = %line, "incoming message");
|
||||||
|
|
||||||
// Parse JSON and validate message format
|
// Parse JSON and validate message format
|
||||||
match serde_json::from_str::<serde_json::Value>(&line) {
|
match serde_json::from_str::<serde_json::Value>(&line) {
|
||||||
|
|
@ -158,7 +158,7 @@ where
|
||||||
let request_json = serde_json::to_string(&request)
|
let request_json = serde_json::to_string(&request)
|
||||||
.unwrap_or_else(|_| "Failed to serialize request".to_string());
|
.unwrap_or_else(|_| "Failed to serialize request".to_string());
|
||||||
|
|
||||||
tracing::info!(
|
tracing::debug!(
|
||||||
request_id = ?id,
|
request_id = ?id,
|
||||||
method = ?request.method,
|
method = ?request.method,
|
||||||
json = %request_json,
|
json = %request_json,
|
||||||
|
|
@ -188,7 +188,7 @@ where
|
||||||
let response_json = serde_json::to_string(&response)
|
let response_json = serde_json::to_string(&response)
|
||||||
.unwrap_or_else(|_| "Failed to serialize response".to_string());
|
.unwrap_or_else(|_| "Failed to serialize response".to_string());
|
||||||
|
|
||||||
tracing::info!(
|
tracing::debug!(
|
||||||
response_id = ?response.id,
|
response_id = ?response.id,
|
||||||
json = %response_json,
|
json = %response_json,
|
||||||
"Sending response"
|
"Sending response"
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ async fn sse_handler(State(app): State<App>) -> Sse<impl Stream<Item = Result<Ev
|
||||||
// it's 4KB
|
// it's 4KB
|
||||||
const BUFFER_SIZE: usize = 1 << 12;
|
const BUFFER_SIZE: usize = 1 << 12;
|
||||||
let session = session_id();
|
let session = session_id();
|
||||||
tracing::info!(%session, "sse connection");
|
tracing::debug!(%session, "sse connection");
|
||||||
let (c2s_read, c2s_write) = tokio::io::simplex(BUFFER_SIZE);
|
let (c2s_read, c2s_write) = tokio::io::simplex(BUFFER_SIZE);
|
||||||
let (s2c_read, s2c_write) = tokio::io::simplex(BUFFER_SIZE);
|
let (s2c_read, s2c_write) = tokio::io::simplex(BUFFER_SIZE);
|
||||||
app.txs
|
app.txs
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue