Skip to content

Commit

Permalink
Merge pull request #21080 from soltysh/bug1631087_3.11
Browse files Browse the repository at this point in the history
Bug 1632155 - Accept logFormat when passed to audit config
  • Loading branch information
openshift-merge-robot committed Oct 1, 2018
2 parents 2a86335 + 67af498 commit f7602dd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ func GetAuditConfig(auditConfig configapi.AuditConfig) (audit.Backend, auditpoli
// backwards compatible writer to regular log
writer = cmdutil.NewGLogWriterV(0)
}
backend = auditlog.NewBackend(writer, auditlog.FormatJson, auditv1beta1.SchemeGroupVersion)
format := auditConfig.LogFormat
if len(format) == 0 {
format = auditlog.FormatJson
}
backend = auditlog.NewBackend(writer, string(format), auditv1beta1.SchemeGroupVersion)
policyChecker = auditpolicy.NewChecker(&auditinternal.Policy{
// This is for backwards compatibility maintaining the old visibility, ie. just
// raw overview of the requests comming in.
Expand Down

0 comments on commit f7602dd

Please sign in to comment.