From 67017561299dc4fbd4f9ebfafc112d9157904469 Mon Sep 17 00:00:00 2001
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date: Thu, 27 Jul 2006 08:51:48 +0000
Subject: Revamped logging system based on the Logger class from stdlib

---
 bin/rbot | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'bin/rbot')

diff --git a/bin/rbot b/bin/rbot
index 3d4a0548..2f3ec9a1 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -35,11 +35,12 @@ $opts = Hash.new
 orig_opts = ARGV.dup
 
 opts = GetoptLong.new(
+  ["--background", "-b", GetoptLong::NO_ARGUMENT],
   ["--debug", "-d", GetoptLong::NO_ARGUMENT],
   ["--help",  "-h", GetoptLong::NO_ARGUMENT],
+  ["--loglevel",  "-l", GetoptLong::REQUIRED_ARGUMENT],
   ["--trace",  "-t", GetoptLong::REQUIRED_ARGUMENT],
-  ["--version", "-v", GetoptLong::NO_ARGUMENT],
-  ["--background", "-b", GetoptLong::NO_ARGUMENT]
+  ["--version", "-v", GetoptLong::NO_ARGUMENT]
 )
 
 $debug = false
@@ -51,6 +52,8 @@ opts.each {|opt, arg|
   $opts[opt.sub(/^-+/, "")] = arg
 }
 
+$cl_loglevel = $opts["loglevel"]
+
 if ($opts["trace"])
   set_trace_func proc { |event, file, line, id, binding, classname|
     if classname.to_s == $opts["trace"]
-- 
cgit v1.2.3