Class: Writer::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/writer/logger.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configObject



17
18
19
# File 'lib/writer/logger.rb', line 17

def config
  @config ||= Writer.config
end

Instance Method Details

#info(*args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/writer/logger.rb', line 3

def info(*args)
  return if log_level < 2

  out = if args.many?
          o = ["#{args.pop}:"]
          args.each { |a| o << a }
        else
          [args]
        end

  $stdout.print(out.join(' ') + "\n")
end