Module | Ramaze::Logging |
In: |
lib/ramaze/log/logging.rb
|
This module provides a basic skeleton for your own loggers to be compatible.
@example
class MyLogger include Logging def log(tag, *args) p tag => args end end
Inspects objects if they are no strings. Tag is :debug
@param [Array] objects An array of objects that will be inspected.
Inspects objects if they are no strings. Tag is :dev
@param [Array] objects An array of objects that will be inspected.
Converts everything given to strings and passes them on with :info
@param [Array] objects An array of objects that need to be converted to
strings.
Takes the tag (:warn|:debug|:error|:info) and the name of a method to be called upon elements of msgs that don‘t respond to :to_str Goes on and sends the tag and transformed messages each to the log method. If you include this module you have to define log or it will raise.
@param [String] tag The level of the log message. @param [String] method @param [Array] msgs The data that should be logged.
Converts everything given to strings and passes them on with :warn
@param [Array] objects An array of objects that need to be converted to
strings.