facebook / chef-utils

Utilities related to Chef
Apache License 2.0
291 stars 79 forks source link

Fix stdout logging from chefctl #75

Closed jaymzh closed 5 years ago

jaymzh commented 5 years ago

This PR fixes two issues:

  1. Chefctl assumes the logger from Mixlib::Log::Logger and Logger are the same, but they are not. One's message is a has and ones is a string.
  2. Mixlib::Log doesn't know about programname in the way Logger does, so console messages were also missing that and had an awkward space. This fills in a sane default.

With this PR messages go from:

[2019-07-27 00:01:11 +0000] INFO : {:msg=>"Updating chef repo"}

to

[2019-07-27 00:01:25 +0000] INFO chefctl: Updating chef repo

Signed-off-by: Phil Dibowitz phil@ipom.com

jaymzh commented 5 years ago

Thanks @NaomiReeves! IIRC, this is sync'd using ShipIt, so you'll need to click the "import" button in the opensource tool, then land the internal diff, which will push the change and close this PR...

NaomiReeves commented 5 years ago

@jaymzh yep, just had to step away mid workflow. It's been imported and landed, should close shortly.

jaymzh commented 5 years ago

Thank you! <3

facebook-github-bot commented 5 years ago

@NaomiReeves merged this pull request in facebook/chef-utils@a3bcaa80a5e8352730c3d6d42275d7cbf73e7a67.