# 

**URL:** <https://discourse.chef.io/t/topic/4426>\
**Category:** Chef Infra (archive)\
**Created:** [September 10, 2013, 9:46am UTC](https://discourse.chef.io/t/topic/4426 "2013-09-10T09:46:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shyam\_Goud](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@Shyam\_Goud](https://discourse.chef.io/u/Shyam_Goud)\
**Post date:** [September 10, 2013, 9:46am UTC](https://discourse.chef.io/t/topic/4426/1 "2013-09-10T09:46:08Z")

</div>

Hello All,

I want to set chef\_client log\_level to Info while bootstrapping. Right now  
i see it is set to :auto in client.rb.

I believe client.rb is pushed from chef-server to client right ? What  
config files on chef-server needs to be modified for changing the default  
log\_level ?

\*root@controller:/etc# chef-client -v  
Chef: 11.4.4

root@controller:/etc# cat chef/client.rb \*\*  
**log\_level :auto**  
**log\_location STDOUT**  
\*\*chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)  
\*\*  
**validation\_client\_name “chef-validator”**  
\*_node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com)_

Thanks in advance.  
Shyam

---

<div class="post-metadata">

**Author:** ![lemsx1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/lemsx1/32/462_2.png) [@lemsx1](https://discourse.chef.io/u/lemsx1)\
**Post date:** [September 10, 2013, 11:01am UTC](https://discourse.chef.io/t/topic/4426/2 "2013-09-10T11:01:09Z")

</div>

Do "chef-client --help" and look for log level. I believe is "--loglevel info".

That way you set the option at run time.

Regards,

--  
A bug magnet

On Sep 10, 2013, at 5:46, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:

> Hello All,
> 
> I want to set chef\_client log\_level to Info while bootstrapping. Right now i see it is set to :auto in client.rb.
> 
> I believe client.rb is pushed from chef-server to client right ? What config files on chef-server needs to be modified for changing the default log\_level ?  
> root@controller:/etc# chef-client -v  
> Chef: 11.4.4
> 
> root@controller:/etc# cat chef/client.rb  
> log\_level :auto  
> log\_location STDOUT  
> chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"  
> validation\_client\_name "chef-validator"  
> node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com)  
> Thanks in advance.  
> Shyam

---

<div class="post-metadata">

**Author:** ![Shyam\_Goud](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@Shyam\_Goud](https://discourse.chef.io/u/Shyam_Goud)\
**Post date:** [September 10, 2013, 11:17am UTC](https://discourse.chef.io/t/topic/4426/3 "2013-09-10T11:17:05Z")

</div>

Thanks for the reply Luis.

"chef-client --log-level info" needs to be run from Client Machine  
(Bootstrapped Machine) ?

I want to see the detailed execution logs while bootstrapping from  
workstation, right now it seems the log\_level is auto in 11.4.4 ( which is  
converted as "WARN" ).  
While bootstrapping is there any way i can see the chef logs like  
"--log-level: info"

Regards,  
Shyam

On Tue, Sep 10, 2013 at 4:31 PM, Luis Mondesi [lemsx1@gmail.com](mailto:lemsx1@gmail.com) wrote:

> Do "chef-client --help" and look for log level. I believe is "--loglevel  
> info".
> 
> That way you set the option at run time.
> 
> Regards,
> 
> --  
> A bug magnet
> 
> On Sep 10, 2013, at 5:46, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:
> 
> Hello All,
> 
> I want to set chef\_client log\_level to Info while bootstrapping. Right now  
> i see it is set to :auto in client.rb.
> 
> I believe client.rb is pushed from chef-server to client right ? What  
> config files on chef-server needs to be modified for changing the default  
> log\_level ?
> 
> \*root@controller:/etc# chef-client -v  
> Chef: 11.4.4
> 
> root@controller:/etc# cat chef/client.rb \*\*  
> **log\_level :auto**  
> **log\_location STDOUT**  
> \*\*chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)  
> \*\*  
> **validation\_client\_name "chef-validator"**  
> \*_node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com)_
> 
> Thanks in advance.  
> Shyam

---

<div class="post-metadata">

**Author:** ![lemsx1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/lemsx1/32/462_2.png) [@lemsx1](https://discourse.chef.io/u/lemsx1)\
**Post date:** [September 10, 2013, 11:33am UTC](https://discourse.chef.io/t/topic/4426/4 "2013-09-10T11:33:53Z")

</div>

If its only a one time thing, why don't just use --log-level debug?

--  
A bug magnet

On Sep 10, 2013, at 7:17, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:

> Thanks for the reply Luis.
> 
> "chef-client --log-level info" needs to be run from Client Machine (Bootstrapped Machine) ?
> 
> I want to see the detailed execution logs while bootstrapping from workstation, right now it seems the log\_level is auto in 11.4.4 ( which is converted as "WARN" ).  
> While bootstrapping is there any way i can see the chef logs like "--log-level: info"
> 
> Regards,  
> Shyam
> 
> On Tue, Sep 10, 2013 at 4:31 PM, Luis Mondesi [lemsx1@gmail.com](mailto:lemsx1@gmail.com) wrote:
> 
> > Do "chef-client --help" and look for log level. I believe is "--loglevel info".
> > 
> > That way you set the option at run time.
> > 
> > Regards,
> > 
> > --  
> > A bug magnet
> > 
> > On Sep 10, 2013, at 5:46, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:
> > 
> > > Hello All,
> > > 
> > > I want to set chef\_client log\_level to Info while bootstrapping. Right now i see it is set to :auto in client.rb.
> > > 
> > > I believe client.rb is pushed from chef-server to client right ? What config files on chef-server needs to be modified for changing the default log\_level ?  
> > > root@controller:/etc# chef-client -v  
> > > Chef: 11.4.4
> > > 
> > > root@controller:/etc# cat chef/client.rb  
> > > log\_level :auto  
> > > log\_location STDOUT  
> > > chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"  
> > > validation\_client\_name "chef-validator"  
> > > node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com)  
> > > Thanks in advance.  
> > > Shyam

---

<div class="post-metadata">

**Author:** ![Steven\_De\_Coeyer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steven_de_coeyer/32/328_2.png) [@Steven\_De\_Coeyer](https://discourse.chef.io/u/Steven_De_Coeyer)\
**Post date:** [September 10, 2013, 11:54am UTC](https://discourse.chef.io/t/topic/4426/5 "2013-09-10T11:54:23Z")

</div>

Hi Shyam

With knife bootstrap there is no option to set log level. I don't see why it would default to 'WARN' though..  
You could alway edit /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/knife/core/bootstrap\_context.rb on your server, but I would not recommend it.

Kr,  
Steven

On 10 Sep 2013, at 13:17, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:

> Thanks for the reply Luis.
> 
> "chef-client --log-level info" needs to be run from Client Machine (Bootstrapped Machine) ?
> 
> I want to see the detailed execution logs while bootstrapping from workstation, right now it seems the log\_level is auto in 11.4.4 ( which is converted as "WARN" ).  
> While bootstrapping is there any way i can see the chef logs like "--log-level: info"
> 
> Regards,  
> Shyam
> 
> On Tue, Sep 10, 2013 at 4:31 PM, Luis Mondesi [lemsx1@gmail.com](mailto:lemsx1@gmail.com) wrote:  
> Do "chef-client --help" and look for log level. I believe is "--loglevel info".
> 
> That way you set the option at run time.
> 
> Regards,
> 
> --  
> A bug magnet
> 
> On Sep 10, 2013, at 5:46, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:
> 
> > Hello All,
> > 
> > I want to set chef\_client log\_level to Info while bootstrapping. Right now i see it is set to :auto in client.rb.
> > 
> > I believe client.rb is pushed from chef-server to client right ? What config files on chef-server needs to be modified for changing the default log\_level ?  
> > root@controller:/etc# chef-client -v  
> > Chef: 11.4.4
> > 
> > root@controller:/etc# cat chef/client.rb  
> > log\_level :auto  
> > log\_location STDOUT  
> > chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"  
> > validation\_client\_name "chef-validator"  
> > node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com)  
> > Thanks in advance.  
> > Shyam

---

<div class="post-metadata">

**Author:** ![Shyam\_Goud](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@Shyam\_Goud](https://discourse.chef.io/u/Shyam_Goud)\
**Post date:** [September 10, 2013, 12:13pm UTC](https://discourse.chef.io/t/topic/4426/6 "2013-09-10T12:13:09Z")

</div>

Thanks for the reply Steven,

I did that too.. on my chef-server

/opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/knife/core/bootstrap\_context.rb  
\*---- snip -------------  
\*  
_def config\_content  
client\_rb = \<\<-CONFIG  
log\_level :info  
log\_location STDOUT  
chef\_server\_url "#{@chef\_config[:chef\_server\_url]}"  
validation\_client\_name "#{@chef\_config[:validation\_client\_name]}"  
-----------------------_

But still client.rb on bootstrapped machine shows as  
\*  
root@controller:/etc# cat chef/client.rb  
log\_level :auto  
log\_location STDOUT  
chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"  
validation\_client\_name "chef-validator"  
node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com)"

root@controller:/etc#\*

Regards,  
Shyam.

On Tue, Sep 10, 2013 at 5:24 PM, Steven De Coeyer [steven@banteng.be](mailto:steven@banteng.be) wrote:

> Hi Shyam
> 
> With knife bootstrap there is no option to set log level. I don't see why  
> it would default to 'WARN' though..  
> You could alway  
> edit /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/knife/core/bootstrap\_context.rb  
> on your server, but I would not recommend it.
> 
> Kr,  
> Steven
> 
> On 10 Sep 2013, at 13:17, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:
> 
> Thanks for the reply Luis.
> 
> "chef-client --log-level info" needs to be run from Client Machine  
> (Bootstrapped Machine) ?
> 
> I want to see the detailed execution logs while bootstrapping from  
> workstation, right now it seems the log\_level is auto in 11.4.4 ( which is  
> converted as "WARN" ).  
> While bootstrapping is there any way i can see the chef logs like  
> "--log-level: info"
> 
> Regards,  
> Shyam
> 
> On Tue, Sep 10, 2013 at 4:31 PM, Luis Mondesi [lemsx1@gmail.com](mailto:lemsx1@gmail.com) wrote:
> 
> > Do "chef-client --help" and look for log level. I believe is "--loglevel  
> > info".
> > 
> > That way you set the option at run time.
> > 
> > Regards,
> > 
> > --  
> > A bug magnet
> > 
> > On Sep 10, 2013, at 5:46, Shyam Goud [informshyamgoud@gmail.com](mailto:informshyamgoud@gmail.com) wrote:
> > 
> > Hello All,
> > 
> > I want to set chef\_client log\_level to Info while bootstrapping. Right  
> > now i see it is set to :auto in client.rb.
> > 
> > I believe client.rb is pushed from chef-server to client right ? What  
> > config files on chef-server needs to be modified for changing the default  
> > log\_level ?
> > 
> > \*root@controller:/etc# chef-client -v  
> > Chef: 11.4.4
> > 
> > root@controller:/etc# cat chef/client.rb \*\*  
> > **log\_level :auto**  
> > **log\_location STDOUT**  
> > \*\*chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)  
> > \*\*  
> > **validation\_client\_name "chef-validator"**  
> > \*_node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com)_
> > 
> > Thanks in advance.  
> > Shyam

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [September 10, 2013, 4:34pm UTC](https://discourse.chef.io/t/topic/4426/7 "2013-09-10T16:34:23Z")

</div>

On Tuesday, September 10, 2013 at 5:13 AM, Shyam Goud wrote:

> Thanks for the reply Steven,
> 
> I did that too.. on my chef-server
> 
> ## /opt/chef-server/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/knife/core/bootstrap\_context.rb ---- snip ------------- def config\_content client\_rb = \<\<-CONFIG log\_level :info log\_location STDOUT chef\_server\_url "#{@chef\_config[:chef\_server\_url]}" validation\_client\_name "#{@chef\_config[:validation\_client\_name]}"
> 
> But still client.rb on bootstrapped machine shows as
> 
> root@controller:/etc# cat chef/client.rb  
> log\_level :auto  
> log\_location STDOUT  
> chef\_server\_url "[https://chefserver.nvsd.com/](https://chefserver.nvsd.com/)"  
> validation\_client\_name "chef-validator"  
> node\_name "[controllernode.nvsd.com](http://controllernode.nvsd.com) ([http://controllernode.nvsd.com](http://controllernode.nvsd.com))"
> 
> root@controller:/etc#
> 
> Regards,  
> Shyam.

You need to do any hacking on the box you run `knife bootstrap` from. This won't affect any already-bootstrapped machines (though you can manage those with the chef-client cookbook to your liking).

Take a look at bootstrap templates for customizing the config on the bootstrapped machine:

> **[knife bootstrap](https://docs.chef.io/workstation/knife_bootstrap/)**
>
> A node is any physical, virtual, or cloud device that is configured and maintained by an instance of Chef Infra Client.
