log: enable location on vmodule usage

This commit is contained in:
Martin Holst Swende 2023-09-07 11:12:44 +02:00
parent 8d969279c6
commit 81f5cbd333
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -139,7 +139,10 @@ func (h *GlogHandler) Vmodule(ruleset string) error {
h.patterns = filter
h.siteCache = make(map[uintptr]Lvl)
h.override.Store(len(filter) != 0)
// Enable location storage (globally)
if len(h.patterns) > 0 {
locationEnabled.Store(true)
}
return nil
}