Sha256: 929496b0e7a67c6287e681b69dfb2df86a92bfc51d1b11f149a79cf8423d9b2e

Contents?: true

Size: 395 Bytes

Versions: 172

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Logger
    # Logs a debug message to the Rails standard logger and adds some nicer formatting
    def self.warn(message, caller_string)
      Rails.logger.debug %(\n++++ WARNING: #{message}\nCalled from: #{caller_string}\n)
      nil
    end

    def log_warning(message)
      Alchemy::Logger.warn(message, caller(1..1))
    end
  end
end

Version data entries

172 entries across 172 versions & 1 rubygems

Version Path
alchemy_cms-4.2.1 lib/alchemy/logger.rb
alchemy_cms-4.2.0 lib/alchemy/logger.rb
alchemy_cms-4.2.0.rc1 lib/alchemy/logger.rb
alchemy_cms-4.1.0 lib/alchemy/logger.rb
alchemy_cms-4.0.5 lib/alchemy/logger.rb
alchemy_cms-4.0.4 lib/alchemy/logger.rb
alchemy_cms-4.1.0.rc1 lib/alchemy/logger.rb
alchemy_cms-4.0.3 lib/alchemy/logger.rb
alchemy_cms-4.0.2 lib/alchemy/logger.rb
alchemy_cms-4.1.0.beta lib/alchemy/logger.rb
alchemy_cms-4.0.1 lib/alchemy/logger.rb
alchemy_cms-4.0.0 lib/alchemy/logger.rb