Skip to content

Commit 47ee026

Browse files
committed
fix promslog
1 parent 681f4ec commit 47ee026

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/yace/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func main() {
7676
if err := app.Run(os.Args); err != nil {
7777
// if we exit very early we'll not have set up the logger yet
7878
if logger == nil {
79-
jsonFmt := &promslog.AllowedFormat{}
79+
jsonFmt := &promslog.Format{}
8080
_ = jsonFmt.Set("json")
8181
logger = promslog.New(&promslog.Config{Format: jsonFmt})
8282
}
@@ -354,10 +354,10 @@ func newLogger(format, level string) *slog.Logger {
354354
// If flag parsing was successful, then we know that format and level
355355
// are both valid options; no need to error check their returns, just
356356
// set their values.
357-
f := &promslog.AllowedFormat{}
357+
f := &promslog.Format{}
358358
_ = f.Set(format)
359359

360-
lvl := &promslog.AllowedLevel{}
360+
lvl := &promslog.Level{}
361361
_ = lvl.Set(level)
362362

363363
return promslog.New(&promslog.Config{Format: f, Level: lvl})

pkg/job/scraper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ func TestScrapeRunner_Run(t *testing.T) {
541541
MetadataRunFunc: tc.metadataRunFunc,
542542
CloudwatchRunFunc: tc.cloudwatchRunFunc,
543543
}
544-
lvl := &promslog.AllowedLevel{}
544+
lvl := &promslog.Level{}
545545
_ = lvl.Set("debug")
546546
sr := job.NewScraper(promslog.New(&promslog.Config{Level: lvl}), tc.jobsCfg, &rf)
547547
resources, metrics, errs := sr.Scrape(context.Background())

0 commit comments

Comments
 (0)