Class: Bosh::Deployer::InstanceManager::LoggerRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/deployer/instance_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLoggerRenderer

Returns a new instance of LoggerRenderer.



14
15
16
# File 'lib/deployer/instance_manager.rb', line 14

def initialize
  enter_stage("Deployer", 0)
end

Instance Attribute Details

#indexObject

Returns the value of attribute index.



12
13
14
# File 'lib/deployer/instance_manager.rb', line 12

def index
  @index
end

#stageObject

Returns the value of attribute stage.



12
13
14
# File 'lib/deployer/instance_manager.rb', line 12

def stage
  @stage
end

#totalObject

Returns the value of attribute total.



12
13
14
# File 'lib/deployer/instance_manager.rb', line 12

def total
  @total
end

Instance Method Details

#enter_stage(stage, total) ⇒ Object



18
19
20
21
22
# File 'lib/deployer/instance_manager.rb', line 18

def enter_stage(stage, total)
  @stage = stage
  @total = total
  @index = 0
end

#update(state, task) ⇒ Object



24
25
26
27
# File 'lib/deployer/instance_manager.rb', line 24

def update(state, task)
  Config.logger.info("#{@stage} - #{state} #{task}")
  @index += 1 if state == :finished
end