Class: Serverkit::Logger

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

Overview

A logger class that has a simple formatter by default.

Defined Under Namespace

Classes: Formatter, ResourceApplyStateView, ResourceCheckStateView, ResourceStateView

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.


7
8
9
10
# File 'lib/serverkit/logger.rb', line 7

def initialize(*)
  super
  self.formatter = Formatter.new
end

Instance Method Details

#report_apply_result_of(resource) ⇒ Object


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

def report_apply_result_of(resource)
  message = ResourceApplyStateView.new(resource).to_s
  fatal(message)
end

#report_check_result_of(resource) ⇒ Object


19
20
21
22
# File 'lib/serverkit/logger.rb', line 19

def report_check_result_of(resource)
  message = ResourceCheckStateView.new(resource).to_s
  fatal(message)
end