Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send tink-worker logs to stdout instead of stderr: (#833)
## Description In HookOS, normally, all Docker logs are sent via syslog to Smee. When a container writes its logs to stderr the Docker syslog driver will set the severity to "ERR". This then shows up in Smee's logs. User are consistently confused as to what this severity means and more often than not, they believe the log line to be an error. By writing tink-worker logs to stdout the severity in syslog will be "INFO". Examples: Before: ```bash {"level":"info","ts":1699046587.4014122,"caller":"syslog/receiver.go:160","msg":"msg","msg":{"app-name":"e89e8c7e84ba","facility":"daemon","host":"10.42.0.15","msg":{"caller":"cmd/root.go:53","level":"info","logger":"github.com/tinkerbell/tink","msg":"starting","ts":1699046585.7805724,"version":"devel"},"procid":"736","severity":"ERR"}} {"level":"info","ts":1699046587.4016318,"caller":"syslog/receiver.go:160","msg":"msg","msg":{"app-name":"e89e8c7e84ba","facility":"daemon","host":"10.42.0.15","msg":{"caller":"worker/worker.go:249","level":"info","logger":"github.com/tinkerbell/tink","msg":"starting to process workflow actions","ts":1699046585.7809546,"workerID":"52:54:00:0f:2e:67"},"procid":"736","severity":"ERR"}} ``` After: ```bash {"level":"info","ts":1699047980.6784308,"caller":"syslog/receiver.go:160","msg":"msg","msg":{"app-name":"947f1fb0d32c","facility":"daemon","host":"10.42.0.15","msg":{"caller":"cmd/root.go:55","level":"info","logger":"github.com/tinkerbell/tink","msg":"starting","ts":1699047979.8558161,"version":"devel"},"procid":"738","severity":"INFO"}} {"level":"info","ts":1699047980.6787195,"caller":"syslog/receiver.go:160","msg":"msg","msg":{"app-name":"947f1fb0d32c","facility":"daemon","host":"10.42.0.15","msg":{"caller":"worker/worker.go:249","level":"info","logger":"github.com/tinkerbell/tink","msg":"starting to process workflow actions","ts":1699047979.8561027,"workerID":"52:54:00:0f:2e:67"},"procid":"738","severity":"INFO"}} ``` ## Why is this needed Fixes: # ## How Has This Been Tested? ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information