Permalink
Browse files

Add NONE to disable all logs

  • Loading branch information...
1 parent 4c014b1 commit 267848e694d27e91d08280639a2d8b22579e1d3f @gcao committed Oct 9, 2012
Showing with 7 additions and 5 deletions.
  1. +6 −5 lib/aspector/logger.rb
  2. +1 −0 lib/aspector/logging.rb
View
@@ -50,11 +50,12 @@ def string_to_level level_string
return Logging::DEFAULT_VISIBLE_LEVEL if level_string.nil? or level_string.strip == ''
case level_string.downcase
- when 'error' then Logging::ERROR
- when 'warn' then Logging::WARN
- when 'info' then Logging::INFO
- when 'debug' then Logging::DEBUG
- when 'trace' then Logging::TRACE
+ when 'error' then Logging::ERROR
+ when 'warn' then Logging::WARN
+ when 'info' then Logging::INFO
+ when 'debug' then Logging::DEBUG
+ when 'trace' then Logging::TRACE
+ when 'none' then Logging::NONE
end
end
end
View
@@ -1,6 +1,7 @@
module Aspector
module Logging
# Log levels
+ NONE = 10000
ERROR = 50
WARN = 40
INFO = 30

0 comments on commit 267848e

Please sign in to comment.