Skip to content

Commit

Permalink
fix: minor log changes
Browse files Browse the repository at this point in the history
  • Loading branch information
burningalchemist committed Oct 26, 2024
1 parent 12e9f0a commit 8e80678
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (cc *cachingCollector) Collect(ctx context.Context, conn *sql.DB, ch chan<-
ch <- NewInvalidMetric(errors.Wrap(cc.rawColl.logContext, ctx.Err()))
return
}
slog.Debug("Cache", "size", len(cc.cache))
slog.Debug("Cache size", "count", len(cc.cache))
collTime := time.Now()
select {
case cacheTime := <-cc.cacheSem:
Expand Down
3 changes: 0 additions & 3 deletions sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ func OpenConnection(ctx context.Context, logContext, dsn string, maxConns, maxId
conn.SetMaxOpenConns(maxConns)
conn.SetConnMaxLifetime(maxConnLifetime)

if len(logContext) > 0 {
logContext = fmt.Sprintf("[%s] ", logContext)
}
slog.Debug("Database handle successfully opened", "logContext", logContext, "driver", driver)
return conn, nil
}
Expand Down

0 comments on commit 8e80678

Please sign in to comment.