Module Moped::Loggable
In: lib/moped/loggable.rb

Contains behaviour for logging.

@since 1.0.0

Methods

Public Class methods

Log the payload to debug.

@example Log to debug.

  Loggable.debug("MOPED", payload "30.012ms")

@param [ String ] prefix The log prefix. @param [ String ] payload The log operations. @param [ String ] runtime The runtime in formatted ms.

@since 2.0.0

Log the provided operations.

@example Log the operations.

  Loggable.log_operations("MOPED", {}, 30)

@param [ String ] prefix The prefix for all operations in the log. @param [ Array ] ops The operations. @param [ String ] runtime The runtime in formatted ms.

@since 2.0.0

Log the payload to warn.

@example Log to warn.

  Loggable.warn("MOPED", payload "30.012ms")

@param [ String ] prefix The log prefix. @param [ String ] payload The log operations. @param [ String ] runtime The runtime in formatted ms.

@since 2.0.0

Public Instance methods

Get the default logger.

@example Get the default logger.

  Loggable.default_logger

@return [ Logger ] The default logger.

@since 1.0.0

Get the logger.

@example Get the logger.

  Loggable.logger

@return [ Logger ] The logger.

@since 1.0.0

Set the logger.

@example Set the logger.

  Loggable.logger = logger

@return [ Logger ] The logger.

@since 1.0.0

Get the rails logger.

@example Get the rails logger.

  Loggable.rails_logger

@return [ Logger ] The Rails logger.

@since 1.0.0

[Validate]