New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console output shows extra info #8030

Open
eheydrick opened this Issue Dec 7, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@eheydrick
Copy link

eheydrick commented Dec 7, 2018

Description

In 14.5.33 when chef-client is run interactively in a terminal the output looked like this:

Recipe: base::init
  * ohai_hint[ec2] action create
    * directory[/etc/chef/ohai/hints] action create (up to date)
    * file[/etc/chef/ohai/hints/ec2.json] action create (up to date)
     (up to date)

After upgrading to 14.6.47 and also 14.7.17, the output now shows "INFO Processing" on the same line:

Recipe: base::init
  * ohai_hint[ec2] action create[2018-12-07T22:01:39+00:00] INFO: Processing ohai_hint[ec2] action create (base::init line 14)

    * directory[/etc/chef/ohai/hints] action create[2018-12-07T22:01:39+00:00] INFO: Processing directory[/etc/chef/ohai/hints] action create (/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.6.47/lib/chef/resource/ohai_hint.rb line 43)
 (up to date)
    * file[/etc/chef/ohai/hints/ec2.json] action create[2018-12-07T22:01:39+00:00] INFO: Processing file[/etc/chef/ohai/hints/ec2.json] action create (/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.6.47/lib/chef/resource/ohai_hint.rb line 48)
 (up to date)
     (up to date)

I have this logging config in /etc/chef/client.d/logging.rb:

log_level :info
log_location Chef::Log::Syslog.new("chef-client", ::Syslog::LOG_DAEMON)

If I remove the log_level the output looks like it did in 14.5. I also did not encounter this with the same config on Chef 12.

Chef Version

14.6.47+

Platform Version

Amazon Linux 2018.03

Replication Case

Run chef-client in an SSH terminal.

Client Output

See above.

Stacktrace

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

lamont-granquist commented Dec 10, 2018

probably #7698 which went into 14.6.36

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

lamont-granquist commented Dec 10, 2018

actually that looks more or less entirely correct based on what you told the log system to do. is it fixed if you use log_level :auto?

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

lamont-granquist commented Dec 10, 2018

and what is showing up in the syslog when you try different values of log_level, and how did it behave before (and what is the desired behavior)?

@eheydrick

This comment has been minimized.

Copy link

eheydrick commented Dec 14, 2018

If I set log_level :auto, the interactive terminal output looks good - like pre-14.6.36 output. However, nothing is logged to syslog. With log_level :auto, when the daemon runs non-interactively the INFO logging I'd expect is logged to syslog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment