Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: init temporary logger to print errors during startup #143

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

padlar
Copy link
Contributor

@padlar padlar commented Jan 26, 2023

Closes #142.

Before the logger

➜  image-scanner-operator git:(init-logger) ✗ ./bin/manager

After the call to SetupLogger (console encoder)

  image-scanner-operator git:(init-logger) ✗ ./bin/manager
2023-01-26T15:35:50.911+0100	INFO	setup	required flag/env not set	{"flag": "scan-job-namespace", "env": "SCAN_JOB_NAMESPACE"}

With the SetupLogger with the default Json Encoder

➜  image-scanner-operator git:(init-logger) ✗ ./bin/manager
{"level":"info","ts":"2023-01-26T14:25:13+01:00","logger":"setup","msg":"required flag/env not set","flag":"scan-job-namespace","env":"SCAN_JOB_NAMESPACE"}

@padlar padlar requested a review from a team as a code owner January 26, 2023 13:25
@padlar padlar marked this pull request as draft January 26, 2023 13:28
@erikgb
Copy link
Member

erikgb commented Jan 26, 2023

Looks a lot better already, but maybe simple console logging if this happens?

@padlar padlar self-assigned this Jan 26, 2023
@padlar padlar marked this pull request as ready for review January 26, 2023 14:37
@erikgb
Copy link
Member

erikgb commented Jan 26, 2023

How does the fail output look like now?

@padlar padlar merged commit d9a6134 into statnett:main Jan 26, 2023
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.

Should output error if happens during startup
2 participants