Sha256: f4d3d785f78ad52b67c983c459b8e30f42e06cc6be220643fe184ec946c473ca

Contents?: true

Size: 247 Bytes

Versions: 25

Compression:

Stored size: 247 Bytes

Contents

module Ezlog
  module LogContextHelper
    def within_log_context(context)
      Logging.mdc.push context
      yield
    ensure
      Logging.mdc.pop
    end

    def add_to_log_context(context)
      Logging.mdc.update context
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ezlog-0.10.7 lib/ezlog/log_context_helper.rb
ezlog-0.10.5 lib/ezlog/log_context_helper.rb
ezlog-0.10.3 lib/ezlog/log_context_helper.rb
ezlog-0.10.2 lib/ezlog/log_context_helper.rb
ezlog-0.10.1 lib/ezlog/log_context_helper.rb
ezlog-0.10.0 lib/ezlog/log_context_helper.rb
ezlog-0.9.6 lib/ezlog/log_context_helper.rb
ezlog-0.9.5 lib/ezlog/log_context_helper.rb
ezlog-0.9.1 lib/ezlog/log_context_helper.rb
ezlog-0.9.0 lib/ezlog/log_context_helper.rb
ezlog-0.8.0 lib/ezlog/log_context_helper.rb
ezlog-0.7.1 lib/ezlog/log_context_helper.rb
ezlog-0.7.0 lib/ezlog/log_context_helper.rb
ezlog-0.6.0 lib/ezlog/log_context_helper.rb
ezlog-0.5.3 lib/ezlog/log_context_helper.rb
ezlog-0.5.2 lib/ezlog/log_context_helper.rb
ezlog-0.5.1 lib/ezlog/log_context_helper.rb
ezlog-0.5.0 lib/ezlog/log_context_helper.rb
ezlog-0.4.0 lib/ezlog/log_context_helper.rb
ezlog-0.3.5 lib/ezlog/log_context_helper.rb