Skip to content

Instantly share code, notes, and snippets.

@billzajac
billzajac / elk.rb
Created August 16, 2020 19:50 — forked from mipearson/elk.rb
Structured Logging with Rails & ELK example files
# Copyright 2018 Marketplacer. MIT License.
require 'json'
require 'active_support/core_ext/class/attribute'
require 'active_support/log_subscriber'
module Elk
class RequestLogSubscriber < ActiveSupport::LogSubscriber
PAYLOAD_KEYS_TO_COPY = %i{
controller