- querylog: querylog_memsize setting was reset to 0

Since v0.100.0 the query logs memory buffer was not active,
 despite the default capacity of 1000 items.

Now we remove querylog_memsize setting and replace it with querylog_size_memory
This commit is contained in:
Simon Zolin 2020-03-19 15:53:25 +03:00
parent 72c20acb86
commit bebd43923b
3 changed files with 5 additions and 4 deletions

View File

@ -79,7 +79,7 @@ type dnsConfig struct {
QueryLogEnabled bool `yaml:"querylog_enabled"` // if true, query log is enabled QueryLogEnabled bool `yaml:"querylog_enabled"` // if true, query log is enabled
QueryLogInterval uint32 `yaml:"querylog_interval"` // time interval for query log (in days) QueryLogInterval uint32 `yaml:"querylog_interval"` // time interval for query log (in days)
QueryLogMemSize uint32 `yaml:"querylog_memsize"` // number of entries kept in memory before they are flushed to disk QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
dnsforward.FilteringConfig `yaml:",inline"` dnsforward.FilteringConfig `yaml:",inline"`

View File

@ -28,7 +28,7 @@ dns:
statistics_interval: 90 statistics_interval: 90
querylog_enabled: true querylog_enabled: true
querylog_interval: 90 querylog_interval: 90
querylog_memsize: 0 querylog_size_memory: 0
protection_enabled: true protection_enabled: true
blocking_mode: null_ip blocking_mode: null_ip
blocked_response_ttl: 0 blocked_response_ttl: 0

View File

@ -65,6 +65,7 @@ func checkInterval(days uint32) bool {
func (l *queryLog) WriteDiskConfig(dc *DiskConfig) { func (l *queryLog) WriteDiskConfig(dc *DiskConfig) {
dc.Enabled = l.conf.Enabled dc.Enabled = l.conf.Enabled
dc.Interval = l.conf.Interval dc.Interval = l.conf.Interval
dc.MemSize = l.conf.MemSize
} }
// Clear memory buffer and remove log files // Clear memory buffer and remove log files