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

Refactor Logging #100

Closed
4 tasks done
BugRoger opened this issue Nov 15, 2017 · 1 comment
Closed
4 tasks done

Refactor Logging #100

BugRoger opened this issue Nov 15, 2017 · 1 comment

Comments

@BugRoger
Copy link
Contributor

BugRoger commented Nov 15, 2017

  • Removeglog
  • Insert go-kit/log
  • Formatter for kubectl logs -f to easy development/debugging
  • Leveled Logger (?!)
@databus23
Copy link
Member

databus23 commented Nov 15, 2017

For the leveled logging I would suggest a simple approach for starters:
For stuff thats in the "debug" area we just add a level key e.g.:

logger.Log("message", "some debug message", "level", 2)

We can then have a simple filter in the main logger that ignores all log messages above a certain log level.
All log entries with a level key would be considered level 1 (or 0?)

@BugRoger BugRoger mentioned this issue Dec 15, 2017
BugRoger added a commit that referenced this issue Dec 18, 2017
This commit removes all glog references in favor of the structured
logging approach using go-kit/log.

There is plenty room for improvement. The intention here is to rid glog
without introducing to many bugs.

`kubernikusctl` is left to use glog as the main intent of logging here
is human consumption on the cli without an intermediate log retrieval
system. Also, there's tight integration with k8s clients that log using
glog anyway.

The log output is not yet completely clean and 100% structured logging,
because of the informer framwork being uncooperative. We could get rid
of that using a higher default log threshold instead of the default
`INFO`. That exercise is left for another time.

This commit fixes #100
BugRoger added a commit that referenced this issue Dec 18, 2017
This commit removes all glog references in favor of the structured
logging approach using go-kit/log.

There is plenty room for improvement. The intention here is to rid glog
without introducing to many bugs.

`kubernikusctl` is left to use glog as the main intent of logging here
is human consumption on the cli without an intermediate log retrieval
system. Also, there's tight integration with k8s clients that log using
glog anyway.

The log output is not yet completely clean and 100% structured logging,
because of the informer framwork being uncooperative. We could get rid
of that using a higher default log threshold instead of the default
`INFO`. That exercise is left for another time.

This commit fixes #100
BugRoger added a commit that referenced this issue Dec 18, 2017
This commit removes all glog references in favor of the structured
logging approach using go-kit/log.

There is plenty room for improvement. The intention here is to rid glog
without introducing to many bugs.

`kubernikusctl` is left to use glog as the main intent of logging here
is human consumption on the cli without an intermediate log retrieval
system. Also, there's tight integration with k8s clients that log using
glog anyway.

The log output is not yet completely clean and 100% structured logging,
because of the informer framwork being uncooperative. We could get rid
of that using a higher default log threshold instead of the default
`INFO`. That exercise is left for another time.

This commit fixes #100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants