Skip to content

Commit

Permalink
Disable file logging on extract (#146)
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 authored Nov 13, 2024
1 parent 0b6103a commit ef7986d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/ocp.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ func openShiftCmd() *cobra.Command {
return
}
util.ConfigureLogging(cmd)
util.SetupLogging("ocp-" + workloadConfig.UUID)
if extract {
if err := workloads.ExtractWorkload(ocpConfig, configDir, cmd.Name(), "alerts.yml", "metrics.yml", "metrics-aggregated.yml", "metrics-report.yml"); err != nil {
log.Fatal(err.Error())
}
os.Exit(0)
} else {
util.SetupLogging("ocp-" + workloadConfig.UUID)
}
if checkHealth && (cmd.Name() != "cluster-health" || cmd.Name() == "index") {
ocp.ClusterHealthCheck()
Expand Down

0 comments on commit ef7986d

Please sign in to comment.