Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Find logger level constant
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Feb 24, 2017
1 parent 5b58ffc commit a31e91e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/timber/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def #{severity.downcase}? # def debug?

private
def environment_level
([ENV['LOG_LEVEL'].to_s.upcase, "DEBUG"] & %w[DEBUG INFO WARN ERROR FATAL UNKNOWN]).compact.first
level = ([ENV['LOG_LEVEL'].to_s.upcase, "DEBUG"] & %w[DEBUG INFO WARN ERROR FATAL UNKNOWN]).compact.first
self.class.const_get(level)
end
end
end

0 comments on commit a31e91e

Please sign in to comment.