Module Jmdict::Message
In: lib/jmdict/message.rb

Methods

message  

Public Instance methods

[Source]

    # File lib/jmdict/message.rb, line 4
 4:     def message(statement, log_level = :info)
 5:       if log_level == :error && statement.class.is_a?(Exception.class)
 6:         Rails.logger.send(log_level, statement.backtrace.join("\n    "))
 7:         Rails.logger.send(log_level, statement.message)
 8:         puts(statement.backtrace.join("\n    "))
 9:         puts("ERROR :: " + statement.message)
10:       else
11:         Rails.logger.send(log_level, statement)
12:         puts(statement)
13:       end
14:     end

[Validate]