# Chef client 12 - setting logging level

**URL:** <https://discourse.chef.io/t/chef-client-12-setting-logging-level/6228>\
**Category:** Chef Infra (archive)\
**Created:** [January 28, 2015, 9:35pm UTC](https://discourse.chef.io/t/chef-client-12-setting-logging-level/6228 "2015-01-28T21:35:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Horne](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@John\_Horne](https://discourse.chef.io/u/John_Horne)\
**Post date:** [January 28, 2015, 9:35pm UTC](https://discourse.chef.io/t/chef-client-12-setting-logging-level/6228/1 "2015-01-28T21:35:19Z")

</div>

Hello,

We are running chef client 12.0.3 on a CentOS 7 server.

We have noticed that the ‘client.rb’ file included no logging entries,  
and so nothing was logged of the chef-client runs. By setting the  
’log\_file’ attribute, we now have a log file created (and the relevant  
entry in the client.rb file).

However, it seems that the logging level is defaulting to ‘warn’, and we  
cannot see how to change this to ‘info’.

From [https://github.com/opscode-cookbooks/chef-client](https://github.com/opscode-cookbooks/chef-client) it says that the  
’log\_level’ attribute has been deprecated/replaced: ‘Not set anymore,  
use the default log level and output formatting from Chef 11.’

Does this mean that we cannot change the log level? If I have  
misunderstood, then how do we alter the log level?

Thanks,

John.

## –

John Horne Tel: +44 (0)1752 587287  
Plymouth University, UK

---

<div class="post-metadata">

**Author:** ![Tyler\_Ball](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tyler_ball/32/14_2.png) [@Tyler\_Ball](https://discourse.chef.io/u/Tyler_Ball)\
**Post date:** [January 28, 2015, 11:31pm UTC](https://discourse.chef.io/t/chef-client-12-setting-logging-level/6228/2 "2015-01-28T23:31:12Z")

</div>

You want to set `node['chef_client']['config’][‘log_level’] = ‘info’` if you are using the cookbook - the ‘config’ section of attributes are directly dropped into the /etc/chef/client.rb file. The [GitHub - chef-boneyard/chef-client: Development repository for Chef Client cookbook](https://github.com/opscode-cookbooks/chef-client#usage) section shows some examples of this.

-T

> On Jan 28, 2015, at 1:35 PM, John Horne [john.horne@plymouth.ac.uk](mailto:john.horne@plymouth.ac.uk) wrote:
> 
> Hello,
> 
> We are running chef client 12.0.3 on a CentOS 7 server.
> 
> We have noticed that the 'client.rb' file included no logging entries,  
> and so nothing was logged of the chef-client runs. By setting the  
> 'log\_file' attribute, we now have a log file created (and the relevant  
> entry in the client.rb file).
> 
> However, it seems that the logging level is defaulting to 'warn', and we  
> cannot see how to change this to 'info'.
> 
> From [GitHub - chef-boneyard/chef-client: Development repository for Chef Client cookbook](https://github.com/opscode-cookbooks/chef-client) it says that the  
> 'log\_level' attribute has been deprecated/replaced: 'Not set anymore,  
> use the default log level and output formatting from Chef 11.'
> 
> Does this mean that we cannot change the log level? If I have  
> misunderstood, then how do we alter the log level?
> 
> Thanks,
> 
> John.
> 
> ## --
> 
> John Horne Tel: +44 (0)1752 587287  
> Plymouth University, UK

---

<div class="post-metadata">

**Author:** ![John\_Horne](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@John\_Horne](https://discourse.chef.io/u/John_Horne)\
**Post date:** [January 31, 2015, 12:18am UTC](https://discourse.chef.io/t/chef-client-12-setting-logging-level/6228/3 "2015-01-31T00:18:41Z")

</div>

On Wed, 2015-01-28 at 15:31 -0800, Tyler Ball wrote:

> You want to set `node['chef_client']['config’][‘log_level’] = ‘info’`  
> if you are using the cookbook - the ‘config’ section of attributes are  
> directly dropped into the /etc/chef/client.rb file. The  
> [GitHub - chef-boneyard/chef-client: Development repository for Chef Client cookbook](https://github.com/opscode-cookbooks/chef-client#usage) section shows  
> some examples of this.

Thanks for this. I admit I did not try it initially because the doc  
seemed to simply indicate it was not set. It works fine though.

John.

## --

John Horne Tel: +44 (0)1752 587287  
Plymouth University, UK
