Skip to content

Commit

Permalink
Add NONE to disable all logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gcao committed Oct 9, 2012
1 parent 4c014b1 commit 267848e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/aspector/logger.rb
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/aspector/logging.rb
@@ -1,6 +1,7 @@
module Aspector
module Logging
# Log levels
NONE = 10000
ERROR = 50
WARN = 40
INFO = 30
Expand Down

0 comments on commit 267848e

Please sign in to comment.