lib/ProMotion/helpers/logger.rb in ProMotion-0.7.1 vs lib/ProMotion/helpers/logger.rb in ProMotion-0.7.2
- old
+ new
@@ -31,10 +31,10 @@
LEVELS[self.level] || []
end
# Usage: PM.logger.log("ERROR", "message here", :red)
def log(label, message_text, color)
- return if RUBYMOTION_ENV == "test"
+ return if defined?(RUBYMOTION_ENV) && RUBYMOTION_ENV == "test"
color = COLORS[color] || COLORS[:default]
puts color[0] + NAME + "[#{label}] #{message_text}" + color[1]
end
def error(message)