# Why chef-client keeps logging to journald, when log\_location is set to a file?

**URL:** <https://discourse.chef.io/t/why-chef-client-keeps-logging-to-journald-when-log-location-is-set-to-a-file/15582>\
**Category:** Chef Infra (archive)\
**Created:** [July 17, 2019, 11:35am UTC](https://discourse.chef.io/t/why-chef-client-keeps-logging-to-journald-when-log-location-is-set-to-a-file/15582 "2019-07-17T11:35:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kontooo2X](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@Kontooo2X](https://discourse.chef.io/u/Kontooo2X)\
**Post date:** [July 17, 2019, 11:35am UTC](https://discourse.chef.io/t/why-chef-client-keeps-logging-to-journald-when-log-location-is-set-to-a-file/15582/1 "2019-07-17T11:35:22Z")

</div>

On some machines running CentOS 7.6 I discovered that chef-client (configured with systemd service) is logging its full output to journald. By "full" I mean that it is the same kind of output that you would see by running chef-client in interactive terminal. It's format is different than what is being saved to file configured in `log_location`, but I believe that it shouldn't log every run with level `:info` to journald when it is configured to log to a file.

Here is an example result of running journalctl -u chef-client:

```
[xxx@machine1]# journalctl -u chef-client
-- Logs begin at wto 2019-07-16 10:40:01 CEST, end at śro 2019-07-17 12:22:32 CEST. --
lip 16 16:35:35 hostname.com chef-client[4896]: Starting Chef Client, version 14.5.33
lip 16 16:35:41 hostname.com chef-client[4896]: resolving cookbooks for run list: ["example:test1", "example::test2"]
lip 16 16:35:41 hostname.com chef-client[4896]: Synchronizing Cookbooks:
[...]

```

and on the other machine:

```
[xxx@machine2]# journalctl -u chef-client
-- No entries --

```

My client.rb:

```
chef_server_url 'https://example.com/organizations/example'
validation_client_name 'validator'
log_location '/var/log/file.log'
log_level :info

```

I don't know what it depends on but on some servers it does not log to journald (except informations about being restarted, reloaded, etc). All of the servers are CentOS 7.6 with the same version of chef-client (14.5.33) and the same config file.

Any ideas what might cause it?
