allow to customize the log level

The old log-verbose flag is not appropriate anymore.
You should now use the log-level flag to set your preferred log level.
The default level is "debug" as before, you can also set "info", "warn",
"error"

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-07-13 10:40:24 +02:00
parent 8fc4971df1
commit e0ce2e2e8a
16 changed files with 95 additions and 57 deletions
+2 -2
View File
@@ -264,7 +264,7 @@ func TestUnconfiguredHook(t *testing.T) {
Type: "notifier",
},
}
err := plugin.Initialize(pluginsConfig, true)
err := plugin.Initialize(pluginsConfig, "debug")
assert.Error(t, err)
assert.True(t, plugin.Handler.HasNotifiers())
@@ -277,7 +277,7 @@ func TestUnconfiguredHook(t *testing.T) {
err = ExecuteActionNotification(c, operationDownload, "", "", "", "", "", 0, nil)
assert.NoError(t, err)
err = plugin.Initialize(nil, true)
err = plugin.Initialize(nil, "debug")
assert.NoError(t, err)
assert.False(t, plugin.Handler.HasNotifiers())
+1 -1
View File
@@ -142,7 +142,7 @@ func TestDefenderIntegration(t *testing.T) {
if runtime.GOOS == osWindows {
pluginsConfig[0].Cmd += ".exe"
}
err = plugin.Initialize(pluginsConfig, true)
err = plugin.Initialize(pluginsConfig, "debug")
require.NoError(t, err)
ip := "127.1.1.1"