Sha256: cb67ac4da0d5b07f5de2319e6ed3e589af0c80dba787a7f85a15406fe34ba6b1
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
# frozen_string_literal: true require 'logsformyfamily/logger' require 'logsformyfamily/rack' require 'logsformyfamily/sidekiq' require 'logsformyfamily/version' module LogsForMyFamily class Error < StandardError; end class << self attr_accessor :configuration end def self.logger Thread.current.thread_variable_get(:'logsformyfamily.logger') end def self.logger=(val) Thread.current.thread_variable_set(:'logsformyfamily.logger', val) end module LocalLogger def logger @logger ||= LogsForMyFamily.logger || LogsForMyFamily::Logger.new end end def self.configure yield(configuration) end class Configuration attr_accessor :version, :hostname, :app_name, :backends, :request_id def initialize @version = `command -v git && git rev-parse --short HEAD`.chomp @hostname = `hostname`.strip @app_name = ENV['NEWRELIC_APP'] @backends = [] @request_id = proc { |env| env['core_app.request_id'] } end def to_h { version: @version, hostname: @hostname, app_name: @app_name } end end self.configuration ||= Configuration.new end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logsformyfamily-0.2.2 | lib/logsformyfamily.rb |