diff options
| author | Arne Dußin | 2020-11-25 22:24:36 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-11-25 22:24:36 +0100 |
| commit | 9d469c353eb179a35fad6d42fa3f6fc985b49188 (patch) | |
| tree | d3ead8ed47d31d3345973dfd296b79b81b8e8de4 /src/svg/mod.rs | |
| parent | da19f0174b99db02e50d2f1db8aae6245d7981ca (diff) | |
| download | graf_karto-9d469c353eb179a35fad6d42fa3f6fc985b49188.tar.gz graf_karto-9d469c353eb179a35fad6d42fa3f6fc985b49188.zip | |
Change prints to logs where necessary
There were quite a few places, where I hardcoded a print in. Most of
these should use the logger instead, so I fixed it.
Diffstat (limited to 'src/svg/mod.rs')
| -rw-r--r-- | src/svg/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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), } } } |
