class Celluloid::LogEvent - celluloid-0.16.0 Documentation

# class Celluloid::LogEvent

Wraps a single log event.

### Attributes

id[RW]
message[RW]
progname[RW]
severity[RW]
time[RW]

### Public Class Methods

new(severity, message, progname, time=Time.now) { |: message| ... } click to toggle source

    # File lib/celluloid/logging/log_event.rb, line 6
    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 = Celluloid::UUID.generate
      @severity = severity
      @message = block_given? ? yield : message
      @progname = progname
      @time = time
    end

### Public Instance Methods

<=>(other) click to toggle source

    # File lib/celluloid/logging/log_event.rb, line 16
    def <=>(other)
      @id <=> other.id
    end