On Feb 20, 1:57 pm, Luke Kanies <[email protected]> wrote:
> Hmm, that's probably a bug.  I know the behavior has changed a bit over the 
> years, but I didn't think either of those modes still required console 
> access.  Is that true even when the agent goes into the background?  Or do 
> you want a foreground process with no console logging?

Yes, I think puppet agent would still open a
Puppet::Util::Log.newdestination(:console) if verbose or debug is set,
regardless of --daemonize.

My particular use case is a foreground process without
Puppet::Util::Log.newdestination(:console) set. My snippet provided
Puppet::Util::Log.newdestination(:json) to output each message in json
format instead of plain/structured text. That way other programs using
%x{puppet agent} would have simple to parse messages. Works great with
most puppet applications. In agent two copies of each message are
written to STDOUT, one from :console and one from :json.
I could also see a use case for something like the syslog/file/host/
report destinations from a cronjob. In any of those cases you can't
get info or higher messages without getting output to STDOUT as well.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to