Closed karthanistyr closed 6 years ago
You are on a tear, @karthanistyr! Thank you for these bug reports and PRs to solve them. They're in our queue for investigation and review.
Confirmed the behavior, but the error lay more in a bug in the log class not initializing the actual output target for writing log entries. The logger was honoring a configured log level, but the log output location was not initialized in a way that the log event output would get written anywhere.
@robbkidd Thank you, I agree with your wording. I may have been fixated with "log level" due to my also filing other issues on that same theme. I do agree this one has to do with log initialisation.
Description
Setting a value to
log.level
in chef-apply's config file (default:~/.chef-workstation/config.toml
) doesn't affect the logging properly: it only affects a minimal part of the logging.Chef Apply Version
All versions up until 0.1.13 (latest as of this posting)
Platform Version
Arch Linux patched to latest, as of writing
Replication Case
In
.chef-workstation/config.toml
:Executing:
chef-run myhost path/to/recipe.rb
Client Output
Actual (wrong) output (one line...):
Expected output, complete with the
chef-client
output from the target host: https://gist.github.com/karthanistyr/b007c0225fb44d0ffa8e23cd7d65eed0Stacktrace
N/A
Superficial analysis
In
lib/chef_apply/startup.rb
:The
ChefApply::Log.level
value is reset towarn
after the call toChef::Log.init
.