Module: Alchemy::Logger

Included in:
Cell, Content, Element, Page
Defined in:
lib/alchemy/logger.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.warn(message, caller_string) ⇒ Object

Logs a debug message to the Rails standard logger and adds some nicer formatting



5
6
7
8
# File 'lib/alchemy/logger.rb', line 5

def self.warn(message, caller_string)
  Rails.logger.debug %(\n++++ WARNING: #{message}\nCalled from: #{caller_string}\n)
  return nil
end

Instance Method Details

#log_warning(message) ⇒ Object



10
11
12
# File 'lib/alchemy/logger.rb', line 10

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