Skip to content

Commit

Permalink
Merge pull request #508 from kvark/log
Browse files Browse the repository at this point in the history
Fixed log error levels
  • Loading branch information
kvark committed Jan 28, 2015
2 parents cb47f60 + 5294085 commit cba119d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gl_device/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
extern crate libc;
extern crate "gfx_gl" as gl;

use log;
use log::LogLevel;

use attrib::{SignFlag, IntSubType, IntSize, FloatSubType, FloatSize, Type};
use state::{CullMode, RasterMethod, WindingOrder};
Expand Down Expand Up @@ -619,7 +619,7 @@ impl Device for GlDevice {
-> Result<::ShaderHandle, ::shade::CreateShaderError> {
let (name, info) = shade::create_shader(&self.gl, stage, code, self.info.shading_language);
info.map(|info| {
let level = if name.is_err() { log::ERROR } else { log::WARN };
let level = if name.is_err() { LogLevel::Error } else { LogLevel::Warn };
log!(level, "\tShader compile log: {}", info);
});
name.map(|sh| ::Handle(sh, stage))
Expand All @@ -636,7 +636,7 @@ impl Device for GlDevice {
fn create_program(&mut self, shaders: &[::ShaderHandle], targets: Option<&[&str]>) -> Result<::ProgramHandle, ()> {
let (prog, log) = shade::create_program(&self.gl, &self.caps, shaders, targets);
log.map(|log| {
let level = if prog.is_err() { log::ERROR } else { log::WARN };
let level = if prog.is_err() { LogLevel::Error } else { LogLevel::Warn };
log!(level, "\tProgram link log: {}", log);
});
prog
Expand Down

0 comments on commit cba119d

Please sign in to comment.