Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Conversation

@croomes
Copy link
Contributor

@croomes croomes commented Jan 20, 2021

Sets timestamps to use RFC3339Nano format, and adds command-line flags to configure log level and format.

Currently the -zap-stacktrace-level is hardcoded to panic to avoid stacktraces in the logs for errors that we recover from. kubernetes-sigs/controller-runtime#1348 addresses this.

Previous log entry:

{"level":"info","ts":1611140462.7687058,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":":8080"}

New default:

{"level":"info","timestamp":"2021-01-20T15:47:44.042084444Z,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":":8080"}

@croomes croomes requested review from avestuk and darkowlzz January 20, 2021 15:46
Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@croomes croomes merged commit 26c352a into master Jan 20, 2021
@croomes croomes deleted the log-timestamps branch January 20, 2021 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants