@@ -135,7 +135,8 @@ type Process struct {
135
135
ProcessType ProcessType `json:"processType"`
136
136
Version string `json:"version"`
137
137
AuthSchemaVersion int `json:"authSchemaVersion"`
138
- LogRotate * AcLogRotate `json:"LogRotate,omitempty"`
138
+ LogRotate * AcLogRotate `json:"logRotate,omitempty"`
139
+ AuditLogRotate * AcLogRotate `json:"auditLogRotate,omitempty"`
139
140
}
140
141
141
142
func (p * Process ) SetPort (port int ) * Process {
@@ -180,6 +181,12 @@ func (p *Process) SetLogRotate(lr *CrdLogRotate) *Process {
180
181
return p
181
182
}
182
183
184
+ // SetAuditLogRotate sets the acLogRotate by converting the CrdLogRotate to an acLogRotate.
185
+ func (p * Process ) SetAuditLogRotate (lr * CrdLogRotate ) * Process {
186
+ p .AuditLogRotate = ConvertCrdLogRotateToAC (lr )
187
+ return p
188
+ }
189
+
183
190
// ConvertCrdLogRotateToAC converts a CrdLogRotate to an AcLogRotate representation.
184
191
func ConvertCrdLogRotateToAC (lr * CrdLogRotate ) * AcLogRotate {
185
192
if lr == nil {
@@ -478,7 +485,7 @@ func FromBytes(acBytes []byte) (AutomationConfig, error) {
478
485
return ac , nil
479
486
}
480
487
481
- func ConfigureAgentConfiguration (systemLog * SystemLog , logRotate * CrdLogRotate , p * Process ) {
488
+ func ConfigureAgentConfiguration (systemLog * SystemLog , logRotate * CrdLogRotate , auditLR * CrdLogRotate , p * Process ) {
482
489
if systemLog != nil {
483
490
p .SetSystemLog (* systemLog )
484
491
}
@@ -491,6 +498,7 @@ func ConfigureAgentConfiguration(systemLog *SystemLog, logRotate *CrdLogRotate,
491
498
zap .S ().Warn ("Configuring LogRotate with systemLog.Destination = Syslog will not work" )
492
499
}
493
500
p .SetLogRotate (logRotate )
501
+ p .SetAuditLogRotate (auditLR )
494
502
}
495
503
496
504
}
0 commit comments