Class: DockerLogger

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ DockerLogger

Returns a new instance of DockerLogger.



6
7
8
9
10
11
# File 'lib/docker/logger.rb', line 6

def initialize(*args)
  @stream_output = args[0] == STDOUT || args[0] == STDERR ? true : false
  @group = 'default'

  super(*args)
end

Instance Attribute Details

#groupObject

Returns the value of attribute group.



4
5
6
# File 'lib/docker/logger.rb', line 4

def group
  @group
end

Instance Method Details

#<<(*args) ⇒ Object



13
14
15
16
# File 'lib/docker/logger.rb', line 13

def <<(*args)
  args[0] = decorate(*args[0])
  super(*args)
end

#add(*args) ⇒ Object



18
19
20
21
# File 'lib/docker/logger.rb', line 18

def add(*args)
  args[2] = decorate(args[2])
  super(*args)
end