Skip to content

Commit

Permalink
split
Browse files Browse the repository at this point in the history
  • Loading branch information
noisyscanner committed Oct 22, 2024
1 parent c15cd9f commit 527532d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metrics/src/logreceiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ async fn receive_log(
while let Some(msg) = stream.next().await {
match msg {
Ok(Message::Text(text)) => {
let _ = logprocessor::log_processor(&text.trim().to_string(), &metric_obj, &tracer).await;
for line in text.split("\n") {
let _ = logprocessor::log_processor(&line.trim().to_string(), &metric_obj, &tracer).await;
}
session.text("{\"success\": true}").await.unwrap();
}

Expand Down

0 comments on commit 527532d

Please sign in to comment.