[chef] Re: Output formatter doc lacks information about handlers


Chronological Thread 
  • From: Steffen Gebert < >
  • To:
  • Subject: [chef] Re: Output formatter doc lacks information about handlers
  • Date: Mon, 25 Nov 2013 19:31:06 +0100

Hi Daniel,

>>> A patch for this would be welcome.

I just noticed that the difference is the log level :-/

When I run `chef-client -l info`, I get some output, of course.

Should I still add that to the `doc` formatter?

The output would be then
> Running handlers:
> [2013-11-25T19:26:42+01:00] INFO: Running report handlers
>   - LastRunUpdateHandler finished
>   - Etckeeper::CommitHandler finished
> [2013-11-25T19:26:43+01:00] INFO: Zabbix::Report handler started
>   - Zabbix::Report finished
> 
> Running handlers completed
> 
> [2013-11-25T19:26:43+01:00] INFO: Report handlers complete

(where the "Zabbix::Report handler started" part comes from the handler
itself).

With `-l warn` it looks like this:

> Running handlers:
>   - LastRunUpdateHandler finished
>   - Etckeeper::CommitHandler finished
>   - Zabbix::Report finished
> 
> Running handlers completed

Code is here:

https://github.com/StephenKing/chef/commits/CHEF-4784

Yours
Steffen

On 19/11/13 01:32, Daniel DeLeo wrote:
> 
> 
> On Monday, November 18, 2013 at 4:27 PM, Steffen Gebert wrote:
> 
>> Hi Daniel,
>>
>>> A patch for this would be welcome.
>>
>> Any hint, where to start?
>>
>> Thanks
>> Steffen
>>
>>
> 
> This is the default formatter: 
> https://github.com/opscode/chef/blob/master/lib/chef/formatters/doc.rb
> 
> It inherits from EventDispatch::Base (via one or two other classes) 
> https://github.com/opscode/chef/blob/master/lib/chef/event_dispatch/base.rb ;
> so all you need to do is define the correct method and make it print 
> something. Try to match the markdown-ish style of the rest of the 
> implementation.
> 





Archive powered by MHonArc 2.6.16.

§