Sha256: fb3a7211af68903f342e64c3e79fe21a80e0b6f1cffbbf3495dbd3a9fe755389
Contents?: true
Size: 588 Bytes
Versions: 3
Compression:
Stored size: 588 Bytes
Contents
module Celluloid # Wraps a single log event. class LogEvent attr_accessor :id, :severity, :message, :progname, :time def initialize(severity, message, progname, time=Time.now, &block) # This id should be ordered. For now relies on Celluloid::UUID to be ordered. # May want to use a generation/counter strategy for independence of uuid. @id = Internals::UUID.generate @severity = severity @message = block_given? ? yield : message @progname = progname @time = time end def <=>(other) @id <=> other.id end end end
Version data entries
3 entries across 3 versions & 1 rubygems