Log: Add MaskAddress option to hide IP addresses (#3783)
* Log: Add maskAddress option * Correct IPv6 subnet
This commit is contained in:
1 parent
6b1bf312d7
commit
a247997e38
4 files changed
+91
-17
No files matched your search
+6
-4
@@ -16,10 +16,11 @@ func DefaultLogConfig() *log.Config {
|
||||
}
|
||||
|
||||
type LogConfig struct {
|
||||
AccessLog string `json:"access"`
|
||||
ErrorLog string `json:"error"`
|
||||
LogLevel string `json:"loglevel"`
|
||||
DNSLog bool `json:"dnsLog"`
|
||||
AccessLog string `json:"access"`
|
||||
ErrorLog string `json:"error"`
|
||||
LogLevel string `json:"loglevel"`
|
||||
DNSLog bool `json:"dnsLog"`
|
||||
MaskAddress string `json:"maskAddress"`
|
||||
}
|
||||
|
||||
func (v *LogConfig) Build() *log.Config {
|
||||
@@ -59,5 +60,6 @@ func (v *LogConfig) Build() *log.Config {
|
||||
default:
|
||||
config.ErrorLogLevel = clog.Severity_Warning
|
||||
}
|
||||
config.MaskAddress = v.MaskAddress
|
||||
return config
|
||||
}
|
||||
Reference in new issue
Block a user