master
rascul 2 years ago
parent 0bfe2eab5a
commit 9739f2805d

@ -66,7 +66,7 @@ fn process_event_data(channel: StdioChannel, data: String, app_name: &str) {
StdioChannel::Stderr => "stderr", StdioChannel::Stderr => "stderr",
}; };
info!("[{}] {}: {}", app_name, c, data.trim_end()); info!("[{}] {}: {}", app_name, c, data.trim_end());
} }
/// run the main loop until out of holds /// run the main loop until out of holds
@ -102,15 +102,29 @@ fn run_loop(procs: Vec<Proc>, holds: Option<i8>, poll: Poll, signals: Signals) -
} }
// error reading stdout or stderr // error reading stdout or stderr
Ok(ProcessEvent::IoError(channel, e)) => { Ok(ProcessEvent::IoError(channel, e)) => {
error!("[{}] io error on {:?}: {:?}", &proc.app.name.yellow(), channel, e) error!(
"[{}] io error on {:?}: {:?}",
&proc.app.name.yellow(),
channel,
e
)
} }
// error doing utf8 translation // error doing utf8 translation
Ok(ProcessEvent::Utf8Error(channel, e)) => { Ok(ProcessEvent::Utf8Error(channel, e)) => {
error!("[{}] utf8 error on {:?}: {:?}", &proc.app.name.yellow(), channel, e) error!(
"[{}] utf8 error on {:?}: {:?}",
&proc.app.name.yellow(),
channel,
e
)
} }
// process exited // process exited
Ok(ProcessEvent::Exit(status)) => { Ok(ProcessEvent::Exit(status)) => {
info!("[{}] exited with status {}", &proc.app.name.yellow(), status); info!(
"[{}] exited with status {}",
&proc.app.name.yellow(),
status
);
let hold = proc.app.hold.unwrap_or(false); let hold = proc.app.hold.unwrap_or(false);
if proc.app.check_restart(status) { if proc.app.check_restart(status) {
if let Ok(p) = restart_app(proc) { if let Ok(p) = restart_app(proc) {

Loading…
Cancel
Save