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-7.0.4 lib/alchemy/logger.rb
alchemy_cms-7.0.3 lib/alchemy/logger.rb
alchemy_cms-6.1.9 lib/alchemy/logger.rb
alchemy_cms-7.0.2 lib/alchemy/logger.rb
alchemy_cms-6.1.8 lib/alchemy/logger.rb
alchemy_cms-6.1.7 lib/alchemy/logger.rb
alchemy_cms-7.0.1 lib/alchemy/logger.rb
alchemy_cms-7.0.0 lib/alchemy/logger.rb
alchemy_cms-7.0.0.pre.rc1 lib/alchemy/logger.rb
alchemy_cms-6.1.6 lib/alchemy/logger.rb
alchemy_cms-7.0.0.pre.c lib/alchemy/logger.rb
alchemy_cms-7.0.0.pre.b lib/alchemy/logger.rb
alchemy_cms-6.1.5 lib/alchemy/logger.rb
alchemy_cms-6.0.14 lib/alchemy/logger.rb
alchemy_cms-6.1.4 lib/alchemy/logger.rb
alchemy_cms-7.0.0.pre.a lib/alchemy/logger.rb
alchemy_cms-6.0.13 lib/alchemy/logger.rb
alchemy_cms-6.1.3 lib/alchemy/logger.rb
alchemy_cms-6.1.2 lib/alchemy/logger.rb
alchemy_cms-6.1.1 lib/alchemy/logger.rb