mirror of
https://github.com/LastExceed/spacermake.git
synced 2025-03-12 15:01:44 +01:00
print error on failed machinelog serialization
This commit is contained in:
parent
885548177b
commit
a2e7c2fd63
@ -36,7 +36,10 @@ pub fn machinelog(machine: &str, booking: &Booking) -> io::Result<()> {
|
|||||||
.open("/root/machinelog.csv")?
|
.open("/root/machinelog.csv")?
|
||||||
.pipe(csv::Writer::from_writer)
|
.pipe(csv::Writer::from_writer)
|
||||||
.serialize(record)
|
.serialize(record)
|
||||||
.map_err(|_| io::ErrorKind::Other.into())
|
.map_err(|err| {
|
||||||
|
println!("serialization error: {}", err);
|
||||||
|
io::ErrorKind::Other.into()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn log_debug(topic: &str, payload: &str, result: Result<(), &str>) -> io::Result<()> {
|
pub fn log_debug(topic: &str, payload: &str, result: Result<(), &str>) -> io::Result<()> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user