Sha256: f317c485051c11ae7bfed27f1d337863d4b91c1a1ef6eceab2c4ecdccc5a0186

Contents?: true

Size: 392 Bytes

Versions: 15

Compression:

Stored size: 392 Bytes

Contents

module Alchemy
  module Logger

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

    def warn(message)
      Alchemy::Logger.warn(message, caller.first)
    end
    alias_method :warning, :warn

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
alchemy_cms-2.6.3 lib/alchemy/logger.rb
alchemy_cms-2.6.2.1 lib/alchemy/logger.rb
alchemy_cms-2.6.2 lib/alchemy/logger.rb
alchemy_cms-2.6.1 lib/alchemy/logger.rb
alchemy_cms-2.6.0 lib/alchemy/logger.rb
alchemy_cms-2.6.0.rc5 lib/alchemy/logger.rb
alchemy_cms-2.5.3.1 lib/alchemy/logger.rb
alchemy_cms-2.5.3 lib/alchemy/logger.rb
alchemy_cms-2.5.2.2 lib/alchemy/logger.rb
alchemy_cms-2.5.2.1 lib/alchemy/logger.rb
alchemy_cms-2.5.2 lib/alchemy/logger.rb
alchemy_cms-2.5.1 lib/alchemy/logger.rb
alchemy_cms-2.5.0 lib/alchemy/logger.rb
alchemy_cms-2.5.0.rc3 lib/alchemy/logger.rb
alchemy_cms-2.5.0.b9 lib/alchemy/logger.rb