Method: Log.debug1
- Defined in:
- lib/log.rb
.debug1(msg, *args) ⇒ Object
Log debug level 1 massages params:
msg, *args - Works to construct a string using: msg % args
Examples:
"hello" # no args provided
"Time is %s. have a good day %s", Time.now, "Sir"
Note: Use ONLY %s in msg. Since %d will crush for nil objects, while %s will print empty string.
Implicit to_s is used to convert arg to %s.
If no to_s exists then ruby uses inspection.
162 163 164 165 166 167 168 169 |
# File 'lib/log.rb', line 162 def Log.debug1(msg, *args) if Params['log_debug_level'] >= 1 Log.init if @log4r.nil? msg = msg % args @log4r.debug(msg_with_caller(msg)) Log.flush if Params['log_flush_each_message'] end end |