Created
July 25, 2012 15:27
-
-
Save jelder/3176777 to your computer and use it in GitHub Desktop.
Chef logs: threat or menace?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2012-07-25T15:22:50+00:00] INFO: Processing log[my message] action write (example::default line 5) | |
[2012-07-25T15:22:50+00:00] INFO: my message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chef's logging mechanism is laughably verbose. The most trivial message will | |
# be logged twice, and the most common need, to see only the changes made to | |
# a system, is impossible. | |
log "my message" |
Also, you can turn off the "Processing" lines
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are a lot of opinions on logging and there have been long threads on the Chef mailing list as to what different people prefer.
Those two messages serve entirely different purposes. The first line is a higher level message that tells you what resource is being run. This is useful if you have a resource that isn't doing anything and you want to make sure it's really getting evaluated. If you personally don't find the 'Processing' messages useful, you should set "verbose_logging false" in your chef.rb. The second line, of course, is user generated.
I'm not sure what you're implying would be ideal logging for you.
The new doc formatters that will be in Chef 10.14.0 as part of why-run mode may be of interest to you.