Skip to content

Commit

Permalink
Fix to use log crates for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sumibi-yakitori authored and tronical committed Jan 19, 2024
1 parent 6decc52 commit 3714b24
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ lru = { version = "0.12.0", default-features = false }
image = { version = "0.24.0", optional = true, default-features = false }
serde = { version = "1.0", optional = true, features = ["derive", "rc"] }
glow = { version = "0.13.0", default-features = false }
log = "0.4"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
glutin = { version = "0.30.3", optional = true, default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion examples/paint_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn run(
let mut shape = Shape::Rect;
let mut time_warp = 0;

eprintln!("Scroll vertically to change zoom, horizontally (or vertically with Shift) to change time warp, click to cycle shape.");
log::error!("Scroll vertically to change zoom, horizontally (or vertically with Shift) to change time warp, click to cycle shape.");

let mut swap_directions = false;

Expand Down
2 changes: 1 addition & 1 deletion examples/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn run(
total_sisze_bytes += path.0.size();
}

println!("Path mem usage: {}kb", total_sisze_bytes / 1024);
log::info!("Path mem usage: {}kb", total_sisze_bytes / 1024);

el.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Poll;
Expand Down
2 changes: 1 addition & 1 deletion src/path/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ fn main() {
let mut iter = MutStridedChunks::new(&mut my_array);
while let Some(subslice) = iter.next() {
println!("{:?}", subslice);
log::info!("{:?}", subslice);
}
}
*/
2 changes: 1 addition & 1 deletion src/renderer/opengl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl OpenGl {
_ => "Unknown error",
};

eprintln!("({err}) Error on {label} - {message}");
log::error!("({err}) Error on {label} - {message}");
}

fn gl_factor(factor: BlendFactor) -> u32 {
Expand Down

0 comments on commit 3714b24

Please sign in to comment.