Sha256: 41f6b7656295184f3af32dbfa53905bb2294226ad301c3e7113510b577da2aca

Contents?: true

Size: 323 Bytes

Versions: 1

Compression:

Stored size: 323 Bytes

Contents

# Store in memory the last log message received.
class InMemoryMetricsAppender < SemanticLogger::Subscriber
  attr_accessor :message

  def log(log)
    self.message = log
  end

  # Only forward log entries that contain metrics.
  def should_log?(log)
    log.metric && meets_log_level?(log) && !filtered?(log)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
semantic_logger-4.2.0 test/in_memory_metrics_appender.rb