From e52418d3bfc28cd1f03cc7f31af06fce2e03f844 Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Sat, 19 Mar 2016 16:55:17 -0400 Subject: [PATCH] The debug! macro now checks if we are in a debug build. --- src/macros.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/macros.rs b/src/macros.rs index 071cfac..f5fe8be 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -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)*); + } }) }