Sha256: c491bad8e6ff7a2d6866e607ed956bc2f4aa5e957c32ab7f5ac111b33f115252

Contents?: true

Size: 609 Bytes

Versions: 17

Compression:

Stored size: 609 Bytes

Contents

# encoding: UTF-8

module Vines
  module Log
    @@logger = nil
    def log
      unless @@logger
        @@logger = Logger.new(STDOUT)
        @@logger.level = Logger::INFO
        @@logger.progname = 'vines'
        @@logger.formatter = Class.new(Logger::Formatter) do
          def initialize
            @time = "%Y-%m-%dT%H:%M:%SZ".freeze
            @fmt  = "[%s] %5s -- %s: %s\n".freeze
          end
          def call(severity, time, program, msg)
            @fmt % [time.utc.strftime(@time), severity, program, msg2str(msg)]
          end
        end.new
      end
      @@logger
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
lygneo-vines-0.1.5 lib/vines/log.rb
lygneo-vines-0.1.1 lib/vines/log.rb
vines-0.4.10 lib/vines/log.rb
diaspora-vines-0.1.2 lib/vines/log.rb
vines-0.4.9 lib/vines/log.rb
vines-0.4.8 lib/vines/log.rb
vines-0.4.7 lib/vines/log.rb
vines-0.4.6 lib/vines/log.rb
vines-0.4.5 lib/vines/log.rb
vines-0.4.4 lib/vines/log.rb
vines-0.4.3 lib/vines/log.rb
vines-0.4.2 lib/vines/log.rb
vines-0.4.1 lib/vines/log.rb
vines-0.4.0 lib/vines/log.rb
vines-0.3.2 lib/vines/log.rb
vines-0.3.1 lib/vines/log.rb
vines-0.3.0 lib/vines/log.rb