Issue #20263 has been updated by Charlie Sharpsteen.

Status changed from Needs More Information to Investigating
Assignee changed from Sean Boran to Charlie Sharpsteen

----------------------------------------
Bug #20263: --logdest diverts stdout but not stderr
https://projects.puppetlabs.com/issues/20263#change-91790

* Author: Sean Boran
* Status: Investigating
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category: logging
* Target version: 3.2.2
* Affected Puppet version: 2.7.21
* Keywords: 
* Branch: 
----------------------------------------
I call the puppet agent from cron, sending logs to syslog:
puppet agent --onetime --no-daemonize --logdest=syslog

However if there are warnings or errors, these do not go to the log, but cause 
cron to send emails.
This seems like a bug to me.
One bit of relevant code seems to be in 
/usr/lib/ruby/1.8/puppet/application/agent.rb
    begin
      Puppet::Util::Log.newdestination(arg)
      options[:setdest] = true
    rescue => detail
      puts detail.backtrace if Puppet[:debug]
      $stderr.puts detail.to_s
    end
and /usr/lib/ruby/1.8/puppet/util/log.rb  Log.newdestination(dest) but there I 
dont understand how it diverts the std handles, ruby is new to me..


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to