Method: Puppet::Application#handle_logdest_arg

Defined in:
lib/puppet/application.rb

#handle_logdest_arg(arg) ⇒ Object



477
478
479
480
481
482
483
484
485
486
487
488
489
# File 'lib/puppet/application.rb', line 477

def handle_logdest_arg(arg)
  return if arg.nil?

  logdest = arg.split(',').map!(&:strip)
  Puppet[:logdest] = arg

  logdest.each do |dest|
    Puppet::Util::Log.newdestination(dest)
    options[:setdest] = true
  rescue => detail
    Puppet.log_and_raise(detail, _("Could not set logdest to %{dest}.") % { dest: arg })
  end
end