diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 8 | ||||
| -rw-r--r-- | src/svg/mod.rs | 12 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs index 6c9a0ec..f669ec6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,13 +42,15 @@ fn main() { */ let config = Config::default(); if err.kind() == io::ErrorKind::NotFound { - println!("Could not find a configuration file. Creating default."); + warn!("Could not find a configuration file. Creating default."); config .write_file(CONFIG_FILE) .expect("Could not write config file."); } else { - println!("Could not read configuration file: {}", err); - println!("Using defaults for this run."); + error!( + "Could not read configuration file: {}\nUsing defaults for this run.", + err + ); } config diff --git a/src/svg/mod.rs b/src/svg/mod.rs index 0fcdb0f..fffc00b 100644 --- a/src/svg/mod.rs +++ b/src/svg/mod.rs @@ -84,7 +84,7 @@ where if let XMLNode::Element(child) = child { match child.name.as_str() { "path" => draw_path(self, child, pixels_per_m, position_px), - other => println!("Unsupported SVG-Element {}", other), + other => warn!("Unsupported SVG-Element {}", other), } } } @@ -103,8 +103,8 @@ fn draw_path( match Style::from_str(style_data) { Ok(style) => style, Err(err) => { - println!("Could not parse path style: {}", err); - println!("Using default style instead"); + warn!("Could not parse path style: {}", err); + warn!("Using default style instead"); Style::default() } } @@ -115,7 +115,7 @@ fn draw_path( let move_data = match path_data.attributes.get("d") { Some(d) => d, None => { - println!("Unable to draw path, no move data found"); + error!("Unable to draw path, no move data found"); return; } }; @@ -123,7 +123,7 @@ fn draw_path( let mut path: SVGPath = match move_data.parse() { Ok(mv) => mv, Err(err) => { - println!( + error!( "Unable to draw path, move data not correctly formatted: {}", err ); @@ -169,7 +169,7 @@ fn draw_path( current_pos.y = *y as f32; } PathSegment::ClosePath { .. } => return, - other => println!("Ignoring unsupported {:?}", other), + other => warn!("Ignoring unsupported {:?}", other), } } } |
