Method: OpsWalrus::App#initialize
- Defined in:
- lib/opswalrus/app.rb
#initialize(pwd = Dir.pwd) ⇒ App
Returns a new instance of App.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/opswalrus/app.rb', line 41 def initialize(pwd = Dir.pwd) SemanticLogger.default_level = :warn # SemanticLogger.add_appender(file_name: 'development.log', formatter: :color) # Log to a file, and use the colorized formatter SemanticLogger.add_appender(io: $stdout, formatter: :color) # Log errors and above to standard error: @logger = SemanticLogger[OpsWalrus] # Logger.new($stdout, level: Logger::INFO) @logger.level = :warn # :trace or 'trace' # @logger.warn Style.yellow("warn"), foo: "bar", baz: {qux: "quux"} # @logger.info Style.yellow("info"), foo: "bar", baz: {qux: "quux"} # @logger.debug Style.yellow("debug"), foo: "bar", baz: {qux: "quux"} # @logger.trace Style.yellow("trace"), foo: "bar", baz: {qux: "quux"} @sudo_user = nil @sudo_password = nil @identity_file_paths = [] @inventory_host_references = [] @inventory_tag_selections = [] @params = nil @pwd = pwd.to_pathname @bundler = Bundler.new(self, @pwd) @local_hostname = "localhost" @mode = nil @dry_run = false @zip_mutex = Thread::Mutex.new end |