Method: Log#info

Defined in:
lib/nub/log.rb

#info(*args) ⇒ Object



187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/nub/log.rb', line 187

def info(*args)
  @@_monitor.synchronize{
    if LogLevel.info <= self.level
      opts = args.find{|x| x.is_a?(Hash)}
      opts[:type] = 'I' if opts
      args << {:type => 'I'} if !opts
      newline = (opts && opts.key?(:newline)) ? opts[:newline] : true
      return newline ? self.puts(*args) : self.print(*args)
    end
    return true
  }
end