File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed
Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ func initialize() {
2626 logLevel := zerolog .InfoLevel
2727 switch strings .ToLower (logLevelVar ) {
2828 case "none" :
29- logLevel = utils . NoneLevel
29+ logLevel = zerolog . Disabled
3030 case "trace" :
3131 logLevel = zerolog .TraceLevel
3232 case "debug" :
Original file line number Diff line number Diff line change 88 "github.com/checkmarx/2ms/lib/config"
99 "github.com/checkmarx/2ms/lib/reporting"
1010 "github.com/checkmarx/2ms/lib/secrets"
11- "github.com/checkmarx/2ms/lib/utils"
1211 "github.com/checkmarx/2ms/plugins"
1312 "github.com/rs/zerolog"
1413 "github.com/rs/zerolog/log"
@@ -167,13 +166,13 @@ func postRun(cmd *cobra.Command, args []string) error {
167166 cfg := config .LoadConfig ("2ms" , Version )
168167
169168 if Report .TotalItemsScanned > 0 {
170- if zerolog .GlobalLevel () != utils . NoneLevel || len (reportPathVar ) > 0 {
169+ if zerolog .GlobalLevel () != zerolog . Disabled || len (reportPathVar ) > 0 {
171170 output , err := Report .GetOutput (stdoutFormatVar , cfg )
172171 if err != nil {
173172 return err
174173 }
175174
176- if zerolog .GlobalLevel () != utils . NoneLevel {
175+ if zerolog .GlobalLevel () != zerolog . Disabled {
177176 if err := Report .ShowReport (output ); err != nil {
178177 return err
179178 }
Original file line number Diff line number Diff line change @@ -5,15 +5,12 @@ import (
55 "path/filepath"
66 "strings"
77
8- "github.com/rs/zerolog"
98 "github.com/rs/zerolog/log"
109 "github.com/spf13/cobra"
1110 "github.com/spf13/pflag"
1211 "github.com/spf13/viper"
1312)
1413
15- var NoneLevel = zerolog .Disabled
16-
1714func LoadConfig (v * viper.Viper , configFilePath string ) error {
1815 if configFilePath == "" {
1916 return nil
You can’t perform that action at this time.
0 commit comments