Skip to content
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

End the formatter and logger confusion and have the formatter output log messages #9126

Open
lamont-granquist opened this issue Nov 27, 2019 · 0 comments

Comments

@lamont-granquist
Copy link
Contributor

@lamont-granquist lamont-granquist commented Nov 27, 2019

For Chef-16 we should have the formatter output logger warnings through events and turn off the logger by default, and have logger-vs-formatter be an either-or setting and stop allowing the formatter and logger to run at the same time.

Several closed issues referenced below are still relevant and are rolled up under solving this issue.

The default behavior should be to use the formatter. If a user sends the output to a -L logfile then the formatter output should go to the log file and not the output to stdout.

We may need to deprecate the setting of log_location in the config.rb as something that nobody should be doing (so that log_location is not forced to the /var/log output file for command line usage, and that the -L option should be used from systemd/cron/whatever instead by daemon processes). As a stretch goal we might still support cloning the output to STDOUT when on a tty if the logic can be made simple enough to not be the buggy mess that we've had to deal with. I don't mind that as a use case, but its implementation has been a disaster.

Using --force-logger should turn off the formatter and turn on the logger and that should just be what you get. If there's any STDOUT cloning then either the formatter goes to both places or the logger goes to both places, and we don't ever cross the streams. The ability have pretty formatter output to users and logger output to syslog is going to go away permanently. For those affected users, they should really setup better systems involving the data collector to gather and parse output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Chef 16
  
To do
1 participant
You can’t perform that action at this time.