-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Chore: Add pkg/util/log package #5187
Conversation
fd5a310
to
26622ca
Compare
27679cb
to
7b03913
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thanks @aknuds1 Appreciate it.
@@ -81,7 +81,7 @@ func main() { | |||
fmt.Println("Invalid log level") | |||
os.Exit(1) | |||
} | |||
util_log.InitLogger(&config.ServerConfig.Config) | |||
util_log.InitLogger(&config.ServerConfig.Config, prometheus.DefaultRegisterer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :)
7b03913
to
d8a7741
Compare
Thanks @kavirajk! I had to add this metric namespace in the meantime to avoid metric conflict (with Cortex I should think), that caused example config validation to fail (in CI). Does it look alright? |
@kavirajk I am also wondering if I should note in the changelog that the names of two metrics change: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Arve for taking care of it! LGTM!
I feel it is okay to break those two metrics and add an entry in the changelog since we do not have them in any of the dashboards.
@sandeepsukhani OK I'll add to the changelog! |
52d6549
to
95c95a1
Compare
@sandeepsukhani @kavirajk added to the changelog! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this!
@@ -8,6 +8,7 @@ import ( | |||
"syscall" | |||
|
|||
"github.com/cortexproject/cortex/pkg/cortexpb" | |||
cutil "github.com/cortexproject/cortex/pkg/util" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come this is kept?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeschkies the github.com/cortexproject/cortex/pkg/util
package isn't part of the PR's topic though? Only github.com/cortexproject/cortex/pkg/util/log
.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
95c95a1
to
dfc5b73
Compare
Thanks @owen-d! |
What this PR does / why we need it:
Add pkg/util/log package, replacing github.com/cortexproject/cortex/pkg/util/log.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Checklist
CHANGELOG.md
about the changes.