Skip to content

Commit

Permalink
Send tink-worker logs to stdout instead of stderr:
Browse files Browse the repository at this point in the history
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".

Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed Nov 3, 2023
1 parent a9b0899 commit e124c55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/tink-worker/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const (

// NewRootCommand creates a new Tink Worker Cobra root command.
func NewRootCommand(version string) *cobra.Command {
zlog, err := zap.NewProduction()
config := zap.NewProductionConfig()
config.OutputPaths = []string{"stdout"}
zlog, err := config.Build()
if err != nil {
panic(err)
}
Expand Down

0 comments on commit e124c55

Please sign in to comment.