Sha256: 96b9d73147ad80412e0bfed4388e2f327fadcce6d8eb0a7bfcb6e820d707443b

Contents?: true

Size: 261 Bytes

Versions: 16

Compression:

Stored size: 261 Bytes

Contents

module Msgr

  module Logging
    def log(level)
      Msgr.logger.send(level) { "#{self.log_name} #{yield}" } if Msgr.logger
    end

    def log_name
      "[#{Thread.current.object_id.to_s(16)}] <#{self.class.name}[#{object_id.to_s(16)}]>"
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
msgr-0.12.2 lib/msgr/logging.rb
msgr-0.12.1 lib/msgr/logging.rb
msgr-0.12.0 lib/msgr/logging.rb
msgr-0.11.1 lib/msgr/logging.rb
msgr-0.11.0 lib/msgr/logging.rb
msgr-0.11.0.rc3 lib/msgr/logging.rb
msgr-0.11.0.rc2 lib/msgr/logging.rb
msgr-0.11.0.rc1 lib/msgr/logging.rb
msgr-0.10.2 lib/msgr/logging.rb
msgr-0.10.1 lib/msgr/logging.rb
msgr-0.10.0 lib/msgr/logging.rb
msgr-0.9.0 lib/msgr/logging.rb
msgr-0.8.0 lib/msgr/logging.rb
msgr-0.7.0 lib/msgr/logging.rb
msgr-0.6.0 lib/msgr/logging.rb
msgr-0.5.0 lib/msgr/logging.rb