Sha256: 4fb81d2ede8eacb9aba53be26a601637851afb5352c7a0e209a0e08d0124f2eb

Contents?: true

Size: 470 Bytes

Versions: 13

Compression:

Stored size: 470 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(', ')}" unless params.blank?
      Rails.logger.method(level).call("#{line}, message=\"#{msg}\"")
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.0.2.pre.RC8 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC9 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC7 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC6 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC5 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC4 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC3 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC2 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.2.pre.RC1 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.1 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.0 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.0.pre.RC13 app/models/maestrano/connector/rails/concerns/connector_logger.rb
maestrano-connector-rails-2.0.0.pre.RC12 app/models/maestrano/connector/rails/concerns/connector_logger.rb