Skip to content

Commit

Permalink
chore: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Aug 6, 2024
1 parent a40bba5 commit 1e6b78a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion screenpipe-server/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ async fn process_audio_result(
}
let transcription = result.transcription.unwrap();

info!("Inserting audio chunk: {:?}", transcription);
info!("Inserting audio chunk: {:?}", result.input.path);
match db.insert_audio_chunk(&result.input.path).await {
Ok(audio_chunk_id) => {
// if audio text is empty skip transcription insertion
Expand Down
12 changes: 1 addition & 11 deletions screenpipe-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,21 +515,11 @@ impl Server {
.layer(
// https://github.com/tokio-rs/axum/blob/main/examples/tracing-aka-logging/src/main.rs
TraceLayer::new_for_http()
.make_span_with(DefaultMakeSpan::new().include_headers(true))
.on_request(DefaultOnRequest::new().level(Level::INFO))
.on_response(
DefaultOnResponse::new()
.level(Level::INFO)
.latency_unit(LatencyUnit::Micros),
),
.make_span_with(DefaultMakeSpan::new().include_headers(true)),
)
.with_state(app_state);

info!("Starting server on {}", self.addr);
// info!("Audio devices:");
// for (device, control) in device_status.iter() {
// info!("{}: {}", device, control.is_running);
// }

match serve(TcpListener::bind(self.addr).await?, app.into_make_service()).await {
Ok(_) => {
Expand Down

0 comments on commit 1e6b78a

Please sign in to comment.