Logging Question

Hi

I am a little embarrassed as I have been working with CHEF for many years and should know the answer to this! I am just finishing my first big Linux based CHEF project and am trying to log the automatic CHEF runs. Chef runs as a demon and I have set log_location to /var/log/client.log and log_level to ':info'. I have also set 'verbose_logging' to true as well. (all in client.rb using the chef-client cookbook. I run chef-client::default and chef-client::config using include_recipe after setting the above attributes)

CHEF runs are logged, but I don't get the same level of detail that I get if I run chef-client from a shell. I can't get it to log changes to templates for example.

When run from shell I see what changes in the template
Recipe: server_admin::test

  • template[/usr/local/deploy/test.txt] action create
    • update content in file /usr/local/deploy/test.txt from 82c1cc to 0b9267
      --- /usr/local/deploy/test.txt 2019-05-08 00:24:11.260353551 +0100
      +++ /usr/local/deploy/.chef-test20190508-19727-paiy4c.txt 2019-05-08 00:24:58.495549023 +0100
      @@ -1,2 +1,2 @@
      -2019-05-08 00:24:10 +0100
      +2019-05-08 00:24:57 +0100

When I look at the log from an automatic CHEF run I see the following

[2019-05-08T00:24:11+01:00] INFO: Processing template[/usr/local/deploy/test.txt] action create (server_admin::test line 1)
[2019-05-08T00:24:11+01:00] INFO: template[/usr/local/deploy/test.txt] backed up to /var/chef/backup/usr/local/deploy/test.txt.chef-20190508002411.264784
[2019-05-08T00:24:11+01:00] INFO: template[/usr/local/deploy/test.txt] removed backup at /var/chef/backup/usr/local/deploy/test.txt.chef-20190508001604.725589
[2019-05-08T00:24:11+01:00] INFO: template[/usr/local/deploy/test.txt] updated file contents /usr/local/deploy/test.txt

Thanks in advance

David