Sha256: dea6d8d876666a7cbd19b8278d176cb512c32a3282518a9eebd990040e9555fa
Contents?: true
Size: 616 Bytes
Versions: 1
Compression:
Stored size: 616 Bytes
Contents
require "glib2" require "rabbit/logger/base" module Rabbit module Logger class STDERR include Base private def do_log(severity, prog_name, message) begin message = message.encode("locale") rescue EncodingError format = _("can't convert to current locale from UTF-8: %s") $stderr.puts(format % message.encode(format.encoding)) end $stderr.puts(format_severity(severity)) $stderr.print("[#{prog_name}]: ") if prog_name $stderr.puts(message) exit if severity >= Severity::FATAL end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rabbit-2.1.3 | lib/rabbit/logger/stderr.rb |