class Dockerspec::Builder::Logger

Creates an output logger for the {Dockerspec::Builder}.

Public Class Methods

instance(type) click to toggle source

Creates a logger object.

@param type [Integer, Symbol] The logger to create. Possible values:

`:silent` or `0` (no output),
`:ci` or `1` (enables some outputs recommended for CI environments),
`:info` or `2` (gives information about main build steps),
`:debug` or `3` (outputs all the provided information in its raw
  original form).

@return [Dockerspec::Builder::Logger] The logger.

@api public

# File lib/dockerspec/builder/logger.rb, line 45
def self.instance(type)
  case type.to_s.downcase
  when '0', 'silent' then Silent.new
  when '1', 'ci' then CI.new
  when '2', 'info' then Info.new
  else
    Debug.new
  end
end