summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2014-02-18 23:06:42 +0100
committerMatthias H <apoc@sixserv.org>2014-02-18 23:06:42 +0100
commit2a03358b3e17b0c253a665bd460f46914b7b3666 (patch)
tree8b9c78c028f95c35c000c267f5d92662c0f1ae71 /lib
parent4b693c96e0644085150f111cfff732272cf881cc (diff)
log fatal/error messages to stderr, but check if daemonized first!
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/ircbot.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 311334b5..53235edb 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -67,6 +67,9 @@ def rawlog(level, message=nil, who_pos=1)
qmsg.push [level, l.chomp, who]
who = ' ' * who.size
}
+ if level == Logger::Severity::ERROR or level == Logger::Severity::FATAL and not $daemonize
+ $stderr.puts str
+ end
$log_queue.push qmsg
end