service: Option<&str>,
) -> Result<(u64, Vec<Value>), Error> {
- let mut args = vec!["-o", "short", "--no-pagera"];
+ let mut args = vec!["-o", "short", "--no-pager"];
if let Some(service) = service { args.extend(&["--unit", service]); }
if let Some(since) = since { args.extend(&["--since", since]); }
limit -= 1;
}
Err(err) => {
- eprintln!("reading journal failed: {}", err);
+ log::error!("reading journal failed: {}", err);
let _ = child.kill();
break;
}
let status = child.wait().unwrap();
if !status.success() {
- eprintln!("journalctl failed with {}", status);
+ log::error!("journalctl failed with {}", status);
}
// HACK: ExtJS store.guaranteeRange() does not like empty array
fn main() {
+ if let Err(err) = syslog::init(
+ syslog::Facility::LOG_DAEMON,
+ log::LevelFilter::Info,
+ Some("proxmox-backup-api")) {
+ eprintln!("unable to inititialize syslog: {}", err);
+ std::process::exit(-1);
+ }
+
let command : Arc<Schema> = StringSchema::new("Command.")
.format(Arc::new(ApiStringFormat::Enum(vec![
"start".into(),