Add limiting ability to log fields (#24251)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
703ad006ad
Коммит
53a0f8da27
@@ -1276,6 +1276,7 @@ type LogSettings struct {
|
||||
EnableSentry *bool `access:"environment_logging,write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
AdvancedLoggingJSON json.RawMessage `access:"environment_logging,write_restrictable,cloud_restrictable"`
|
||||
AdvancedLoggingConfig *string `access:"environment_logging,write_restrictable,cloud_restrictable"` // Deprecated: use `AdvancedLoggingJSON`
|
||||
MaxFieldSize *int `access:"environment_logging,write_restrictable,cloud_restrictable"`
|
||||
}
|
||||
|
||||
func NewLogSettings() *LogSettings {
|
||||
@@ -1340,6 +1341,10 @@ func (s *LogSettings) SetDefaults() {
|
||||
if s.AdvancedLoggingConfig == nil {
|
||||
s.AdvancedLoggingConfig = NewString("")
|
||||
}
|
||||
|
||||
if s.MaxFieldSize == nil {
|
||||
s.MaxFieldSize = NewInt(2048)
|
||||
}
|
||||
}
|
||||
|
||||
// GetAdvancedLoggingConfig returns the advanced logging config as a []byte.
|
||||
|
||||
Ссылка в новой задаче
Block a user