This adds a print to $stderr for log messages with the
level ERROR or FATAL. I did this because in the past errors
connecting to the server weren't immediately obvious but
rather hidden in the logfile. I think it should be right
in-your-face when the connection doesn't work.
It would probaply be better to extend Logger to print
to STDERR but this apparently requires monkeypatching ruby's
Logger. Anyhow I think my solution works for now.
qmsg.push [level, l.chomp, who]
who = ' ' * who.size
}
+ # Also output (fatal) errors to STDERR:
+ if level == Logger::Severity::ERROR or level == Logger::Severity::FATAL
+ $stderr.puts str
+ end
$log_queue.push qmsg
end