Sha256: 38bee34f17a9db08bd4f8ffab466ea557c99be4683dd7d75cfec966d6e3249c7
Contents?: true
Size: 610 Bytes
Versions: 24
Compression:
Stored size: 610 Bytes
Contents
module Elastics module Rails class Logger < Elastics::Logger attr_accessor :log_to_rails_logger, :log_to_stderr def initialize(*) super self.formatter = proc do |severity, datetime, progname, msg| elastics_formatted = elastics_format(severity, msg) ::Rails.logger.send(severity.downcase.to_sym, elastics_formatted) if log_to_rails_logger && ::Rails.logger.respond_to?(severity.downcase.to_sym) elastics_formatted if log_to_stderr end @log_to_rails_logger = true @log_to_stderr = false end end end end
Version data entries
24 entries across 24 versions & 1 rubygems