Merge pull request #5486 from ehashman/fatal-logs

Add guidance for fatal exit codes
This commit is contained in:
Kubernetes Prow Robot 2021-02-11 02:24:16 -08:00 committed by GitHub
commit eec1ce76b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -150,6 +150,8 @@ origin point. For expected errors (`errors` that can happen during routine opera
Use of Fatal should be discouraged and it's not available in new functions. Instead of depending on the logger to exit Use of Fatal should be discouraged and it's not available in new functions. Instead of depending on the logger to exit
the process, you should call `os.Exit()` yourself. the process, you should call `os.Exit()` yourself.
Fatal calls use a default exit code of 255. When migrating, please use an exit code of 1 and include an "ACTION REQUIRED:" release note.
## Remove string formatting from log message ## Remove string formatting from log message
With structured logging, log messages are no longer formatted, leaving argument marshalling up to the logging client With structured logging, log messages are no longer formatted, leaving argument marshalling up to the logging client