summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-27 08:51:48 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-27 08:51:48 +0000
commit67017561299dc4fbd4f9ebfafc112d9157904469 (patch)
tree2f1e1b4d882b1fb994f7b6ba5c8f231ab387826c /bin
parent19bfab8e4d4da150d07d8b03fdf922a7385b1509 (diff)
Revamped logging system based on the Logger class from stdlib
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rbot7
1 files changed, 5 insertions, 2 deletions
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"]