The debug! macro now checks if we are in a debug build.

This commit is contained in:
Jason Travis Smith 2016-03-19 16:55:17 -04:00
parent d6a6f5107c
commit e52418d3bf

View File

@ -94,6 +94,10 @@ macro_rules! debug
({
use scribe::LogLevel;
log!(LogLevel::DEBUG, $($arg)*);
// Only log this if we are currently in a debug build.
if cfg!(debug_assertions) == true
{
log!(LogLevel::DEBUG, $($arg)*);
}
})
}