Sha256: a9b474a9e902c2a436b2f1898de8f772b4702d392403ad71d58a2b790daecbd4
Contents?: true
Size: 1.11 KB
Versions: 15
Compression:
Stored size: 1.11 KB
Contents
module Heartcheck # A simple Interface to log messages class Logger # log message with debug level # # @param message [String] message to log # # @return [void] def self.debug(message) logger(:debug, message) end # log message with info level # # @param message [String] message to log # # @return [void] def self.info(message) logger(:info, message) end # log message with warn level # # @param message [String] message to log # # @return [void] def self.warn(message) logger(:warn, message) end # log message with error level # # @param message [String] message to log # # @return [void] def self.error(message) logger(:error, message) end private # Sent the message to Heartcheck logger # that you can configure # # @see Heartcheck.logger # @param level [Symbol] the level log # @param message [String] message to log # # @return [void] def self.logger(level, message) Heartcheck.logger.send(level, "[Heartcheck] #{message}") end end end
Version data entries
15 entries across 15 versions & 1 rubygems