From 64b42cd2f3f1da1d6a99dcdf90e6f7728ddca968 Mon Sep 17 00:00:00 2001 From: Lukas Lueg Date: Fri, 13 Jan 2017 08:15:06 +0100 Subject: Use the log-crate instead of printing to stdout --- src/renderer/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/renderer') diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index a70b1ca3..a9833822 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -578,7 +578,7 @@ impl QuadRenderer { if op.contains(op::IGNORED) { if let Some(path) = path.as_ref() { if let Err(err) = watcher.watch(path) { - err_println!("failed to establish watch on {:?}: {:?}", path, err); + warn!("failed to establish watch on {:?}: {:?}", path, err); } } @@ -680,10 +680,10 @@ impl QuadRenderer { Err(err) => { match err { ShaderCreationError::Io(err) => { - err_println!("Error reading shader file: {}", err); + error!("Error reading shader file: {}", err); }, ShaderCreationError::Compile(path, log) => { - err_println!("Error compiling shader at {:?}", path); + error!("Error compiling shader at {:?}", path); let _ = io::copy(&mut log.as_bytes(), &mut io::stdout()); } } @@ -975,7 +975,7 @@ impl ShaderProgram { let ortho = cgmath::ortho(0., width, 0., height, -1., 1.); let projection: [[f32; 4]; 4] = ortho.into(); - println!("width: {}, height: {}", width, height); + info!("width: {}, height: {}", width, height); unsafe { gl::UniformMatrix4fv(self.u_projection, @@ -1014,7 +1014,7 @@ impl ShaderProgram { gl::GetProgramiv(program, gl::LINK_STATUS, &mut success); if success != (gl::TRUE as GLint) { - err_println!("{}", get_program_info_log(program)); + error!("{}", get_program_info_log(program)); panic!("failed to link shader program"); } program -- cgit v1.2.3-54-g00ecf