Skip to content

Commit

Permalink
INT - fix usage logger init (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-axway authored May 14, 2024
1 parent e566b5c commit d22789c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/util/log/loggerconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ func (b *LoggerConfig) Apply() error {

if !isTest && b.usageEnabled {
b.usageCfg.Filename = path.Join(b.path, "audit", b.usageCfg.Filename)
rotateMetricHook, _ := rotatefilehook.NewRotateFileHook(b.usageCfg)
metric.AddHook(rotateMetricHook)
metric.SetOutput(io.Discard) // discard logging to stderr
rotateUsageHook, _ := rotatefilehook.NewRotateFileHook(b.usageCfg)
usage.AddHook(rotateUsageHook)
usage.SetOutput(io.Discard) // discard logging to stderr
}

// Set to initialized if this is not a test
Expand Down

0 comments on commit d22789c

Please sign in to comment.