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

Unify the server logs and the gokit logging. #870

Merged
merged 4 commits into from
Jul 25, 2018

Conversation

tomwilkie
Copy link
Contributor

Fixes #835

Also tidies up the prometheusLogger (which keep metrics on number of log lines per level). Probably want to move this into common.

Depends on weaveworks/common#96, so start there first

@tomwilkie tomwilkie force-pushed the logging branch 2 times, most recently from f96a91a to db27c66 Compare July 6, 2018 15:24
@tomwilkie tomwilkie changed the title [WIP] Unify the server logs and the gokit logging. Unify the server logs and the gokit logging. Jul 6, 2018
@tomwilkie
Copy link
Contributor Author

Testing & this works nicely - we get decent logs from the servers again.

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Looks ok; one nit.

Also I'm not clear what replaced AllowedLevel, but that's mostly curiosity.

Please rebase on the updated weaveworks/common

pkg/util/log.go Outdated
// This code copy-pasted from prometheus/common/promlog.New()
l := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
l = al.Filter(l)
logger := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the comment still correct? ("This code copy-pasted from prometheus/common/promlog.New()")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not in any meaningful way, no. Will remove.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
@tomwilkie
Copy link
Contributor Author

Rebase, pulled in new weaveworks/common so also fixes #882 (and closes #883)

@tomwilkie
Copy link
Contributor Author

Also I'm not clear what replaced AllowedLevel, but that's mostly curiosity.

Thats basically replaced with https://github.com/weaveworks/common/blob/master/logging/level.go

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
@tomwilkie
Copy link
Contributor Author

Can I interpret "Looks ok" as LGTM? :-)

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

LGTM.

I notice kuberesolver was updated; don't know what difference that makes.

@tomwilkie
Copy link
Contributor Author

I notice kuberesolver was updated; don't know what difference that makes.

Good catch. Let me look into that, as there hasn't been semver on that repo before, and a bunch of breaking changes have gone in...

@tomwilkie
Copy link
Contributor Author

Looks safe to me - its pre v2 (when the API changed) and pretty much only adds a change by you, Bryan!

@bboreham
Copy link
Contributor

bboreham commented Jul 28, 2018

I missed that the metric log_messages changed to log_messages_total.
The new name is more correct, but the change is disruptive.

I filed weaveworks/promrus#11

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.

2 participants