Skip to content

Commit

Permalink
Better logging of cache config. (#223)
Browse files Browse the repository at this point in the history
* Print out tests in addition to storing them in json.

* Better logging of cache config.

We don't want to try logging the functions on this struct, just config settings.

* Revert "Print out tests in addition to storing them in json."

This reverts commit 11c3087.
  • Loading branch information
ggreer authored Sep 9, 2024
1 parent ec584af commit 24fede4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pkg/uhttp/gocache.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ func NewGoCache(ctx context.Context, cfg CacheConfig) (GoCache, error) {
return GoCache{}, err
}

l.Debug("http cache config", zap.Any("config", config))
l.Debug("http cache config",
zap.Dict("config",
zap.Int("Shards", config.Shards),
zap.Duration("LifeWindow", config.LifeWindow),
zap.Duration("CleanWindow", config.CleanWindow),
zap.Int("MaxEntriesInWindow", config.MaxEntriesInWindow),
zap.Int("MaxEntrySize", config.MaxEntrySize),
zap.Bool("StatsEnabled", config.StatsEnabled),
zap.Bool("Verbose", config.Verbose),
zap.Int("HardMaxCacheSize", config.HardMaxCacheSize),
))
gc := GoCache{
rootLibrary: cache,
}
Expand Down

0 comments on commit 24fede4

Please sign in to comment.