log: clear siteCache on setting the verbosity

This commit is contained in:
Marius van der Wijden 2025-04-06 14:52:14 +02:00 committed by lightclient
parent 0f03ee83e8
commit 64773bf6bc

View file

@ -68,6 +68,8 @@ type pattern struct {
// and source files can be raised using Vmodule.
func (h *GlogHandler) Verbosity(level slog.Level) {
h.level.Store(int32(level))
// clear the cache to make sure the verbosity is applied correctly.
h.siteCache = make(map[uintptr]slog.Level)
}
// Vmodule sets the glog verbosity pattern.