Sha256: f27ffd79b8fdd3301372099345431557c20ce73346b3caa8c8691e8eced37b74

Contents?: true

Size: 322 Bytes

Versions: 4

Compression:

Stored size: 322 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

4 entries across 4 versions & 1 rubygems

Version Path
semantic_logger-4.3.1 test/in_memory_metrics_appender.rb
semantic_logger-4.3.0 test/in_memory_metrics_appender.rb
semantic_logger-4.2.2 test/in_memory_metrics_appender.rb
semantic_logger-4.2.1 test/in_memory_metrics_appender.rb