From 1a9e4faaa1d3e5658fa21c665aa92f533b1b5bcf Mon Sep 17 00:00:00 2001 From: Blaize M Kaye Date: Mon, 20 Nov 2023 13:51:18 +1300 Subject: [PATCH] Disable zap logger --- internal/handler/trivyProcessing.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/handler/trivyProcessing.go b/internal/handler/trivyProcessing.go index b8e3abd..4cca777 100644 --- a/internal/handler/trivyProcessing.go +++ b/internal/handler/trivyProcessing.go @@ -8,6 +8,7 @@ import ( "github.com/Khan/genqlient/graphql" "github.com/aquasecurity/trivy/pkg/commands/artifact" "github.com/aquasecurity/trivy/pkg/flag" + aqualog "github.com/aquasecurity/trivy/pkg/log" "github.com/aquasecurity/trivy/pkg/types" "github.com/uselagoon/lagoon/services/insights-handler/internal/lagoonclient" "io" @@ -151,10 +152,11 @@ func executeProcessingTrivy(trivyRemoteAddress string, bomWriteDir string, bom c os.Remove(fullFilename) file.Close() }() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*1000) defer cancel() + aqualog.InitLogger(false, true) + opts := flag.Options{ GlobalOptions: flag.GlobalOptions{ ConfigFile: "trivy.yaml",