Module: Sinlog::ShortMixin

Defined in:
lib/sinlog/06_loggable.rb

Overview

Note:

Since mixin monkey patching pollutes the global scope, use include Sinlog::ShortMixin with caution.

Provids convenient logging methods.

Similar to Mixin, but methods omit the log_ prefix.

Methods

  • Object#dbg – DEBUG
  • Object#info – INFO
  • Object#warn – WARN
  • Object#err – ERROR
  • Object#fatal – FATAL
  • Object#unk – UNKNOWN

Examples:


require 'sinlog'

include Sinlog::ShortMixin

"A debug message".dbg
"Hello, world".info

Object.method_defined?(:err) #=> true

See Also: