summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2009-02-26 20:44:07 -0800
committerAdam Jacob <adam@hjksolutions.com>2009-02-26 20:44:07 -0800
commit4be426beb79956cfb45515882b437b51448b50b0 (patch)
tree7d45eaf3d2b99c078622e098fbdd6474098ea918 /bin
parent2c12b849bb306f9ab62cbf01a5b1343e3cfef4c0 (diff)
downloadohai-4be426beb79956cfb45515882b437b51448b50b0.tar.gz
Using symbols for the log levels all the time
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ohai6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ohai b/bin/ohai
index 41a292cd..934b79db 100755
--- a/bin/ohai
+++ b/bin/ohai
@@ -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])