diff options
author | Adam Jacob <adam@hjksolutions.com> | 2009-02-26 20:44:07 -0800 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2009-02-26 20:44:07 -0800 |
commit | 4be426beb79956cfb45515882b437b51448b50b0 (patch) | |
tree | 7d45eaf3d2b99c078622e098fbdd6474098ea918 /bin | |
parent | 2c12b849bb306f9ab62cbf01a5b1343e3cfef4c0 (diff) | |
download | ohai-4be426beb79956cfb45515882b437b51448b50b0.tar.gz |
Using symbols for the log levels all the time
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ohai | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -41,7 +41,7 @@ opts = OptionParser.new do |opts| config[:file] = f end opts.on("-l", "--loglevel NAME", "Set log level for Ohai") do |l| - config[:log_level] = l + config[:log_level] = l.to_sym end opts.on_tail("-h", "--help", "Show this message") do puts opts @@ -52,8 +52,8 @@ opts.parse!(ARGV) ohai = Ohai::System.new -if %( debug info warn error fatal ).include?(config[:log_level]) - Ohai::Config[:log_level] = config[:log_level].to_sym +if [ :debug, :info, :warn, :error, :fatal ].include?(config[:log_level]) + Ohai::Config[:log_level] = config[:log_level] end if config[:file] ohai.from_file(config[:file]) |