mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-09 20:07:49 +00:00
Merge pull request #7742 from frezcirno/fix-log-forwarder-loop
runtime-rs: check peer close in log_forwarder
This commit is contained in:
commit
f0440a9cfe
@ -64,16 +64,14 @@ impl LogForwarder {
|
|||||||
Ok(stream) => {
|
Ok(stream) => {
|
||||||
let stream = BufReader::new(stream);
|
let stream = BufReader::new(stream);
|
||||||
let mut lines = stream.lines();
|
let mut lines = stream.lines();
|
||||||
while let Ok(line) = lines.next_line().await {
|
while let Ok(Some(l)) = lines.next_line().await {
|
||||||
if let Some(l) = line {
|
match parse_agent_log_level(&l) {
|
||||||
match parse_agent_log_level(&l) {
|
LOG_LEVEL_TRACE => trace!(sl!(), "{}", l),
|
||||||
LOG_LEVEL_TRACE => trace!(sl!(), "{}", l),
|
LOG_LEVEL_DEBUG => debug!(sl!(), "{}", l),
|
||||||
LOG_LEVEL_DEBUG => debug!(sl!(), "{}", l),
|
LOG_LEVEL_WARNING => warn!(sl!(), "{}", l),
|
||||||
LOG_LEVEL_WARNING => warn!(sl!(), "{}", l),
|
LOG_LEVEL_ERROR => error!(sl!(), "{}", l),
|
||||||
LOG_LEVEL_ERROR => error!(sl!(), "{}", l),
|
LOG_LEVEL_CRITICAL => crit!(sl!(), "{}", l),
|
||||||
LOG_LEVEL_CRITICAL => crit!(sl!(), "{}", l),
|
_ => info!(sl!(), "{}", l),
|
||||||
_ => info!(sl!(), "{}", l),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user