Sha256: 5b92156baaedb10ab5515b6856f34494380c0320facd5d7cabac1c5645fc8bbf

Contents?: true

Size: 610 Bytes

Versions: 17

Compression:

Stored size: 610 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 = GLib.locale_from_utf8(message)
        rescue GLib::ConvertError
          format = _("can't convert to current locale from UTF-8: %s")
          ::STDERR.puts(format % message)
        end
        ::STDERR.puts(format_severity(severity))
        ::STDERR.print("[#{prog_name}]: ") if prog_name
        ::STDERR.puts(message)
        exit if severity >= FATAL
      end
      
    end
    
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rabbit-1.0.9 lib/rabbit/logger/stderr.rb
rabbit-1.0.8 lib/rabbit/logger/stderr.rb
rabbit-1.0.7 lib/rabbit/logger/stderr.rb
rabbit-1.0.6 lib/rabbit/logger/stderr.rb
rabbit-1.0.5 lib/rabbit/logger/stderr.rb
rabbit-1.0.4 lib/rabbit/logger/stderr.rb
rabbit-1.0.3 lib/rabbit/logger/stderr.rb
rabbit-1.0.2 lib/rabbit/logger/stderr.rb
rabbit-1.0.1 lib/rabbit/logger/stderr.rb
rabbit-1.0.0 lib/rabbit/logger/stderr.rb
rabbit-0.9.3 lib/rabbit/logger/stderr.rb
rabbit-0.9.2 lib/rabbit/logger/stderr.rb
rabbit-0.9.1 lib/rabbit/logger/stderr.rb
rabbit-0.9.0 lib/rabbit/logger/stderr.rb
rabbit-0.6.4 lib/rabbit/logger/stderr.rb
rabbit-0.6.3 lib/rabbit/logger/stderr.rb
rabbit-0.6.2 lib/rabbit/logger/stderr.rb