}
fn main() {
- let mut log = csv::Writer::from_writer(std::io::stdout());
+ let logfile = std::fs::OpenOptions::new()
+ .create(true)
+ .append(true)
+ .open("log.csv")
+ .expect("Coudln't open log file");
+ let mut log = csv::Writer::from_writer(logfile);
let mut presses = HashMap::<MessageKey, Range>::new();
let socket = UdpSocket::bind("0.0.0.0:29803").expect("couldn't bind to address");
loop {