Skip to content

Node Termination Handler only logs to stderr #667

@vbyrd

Description

@vbyrd

Describe the bug
NTH only logs to stderr

See this line of code for the culprit:

log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: timeFormat, NoColor: true})

Steps to reproduce
View log output of the NTH with stderr redirector to /dev/null

Expected outcome
NTH logs to stdout for normal events and stderr for actual error events.

Application Logs
aws-node-termination-handler-logs

Environment

  • NTH App Version: v1.16.5
  • NTH Mode (IMDS/Queue processor): QP
  • OS/Arch: linux
  • Kubernetes version: 1.22
  • Installation method: Helm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions