Sha256: 981814f083ab9496118687bd6319576942afd738cd4d234d59cacfa58c39595e

Contents?: true

Size: 468 Bytes

Versions: 16

Compression:

Stored size: 468 Bytes

Contents

module Maestrano::Connector::Rails::Concerns::ConnectorLogger
  extend ActiveSupport::Concern

  module ClassMethods
    def log(level, organization, msg, params = {})
      line = "uid=\"#{organization&.uid}\", org_uid=\"#{organization&.org_uid}\", tenant=\"#{organization&.tenant}\""
      line = "#{line}, #{params.map { |k, v| "#{k}=\"#{v}\"" }.join(', ')}" if params.present?
      Rails.logger.method(level).call("#{line}, message=\"#{msg}\"")
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.3.6 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.3.5 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.3.4 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.3.3 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.3.2 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.3.1 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.3.0 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.2.1 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.2.0 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.1.3 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.1.2 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.1.1 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.1.0 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC12 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC11 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC10 app/models/maestrano/connector/rails/concerns/connector_logger.rb