You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Thank you for helping KMS Plugin for Key Vault with a pull request!
-->
**Reason for Change**:
<!-- What does this PR improve or fix in KMS Plugin for Key Vault? Why
is it needed? -->
The logging process will be moved to mlog to provide users with better
control over log levels.
**Issue Fixed**:
<!-- If this PR fixes GitHub issue 1234, add "Fixes #1234" to the next
line. -->
fixes#236
**Notes for Reviewers**:
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
managedHSM=flag.Bool("managed-hsm", false, "Azure Key Vault Managed HSM. Refer to https://docs.microsoft.com/en-us/azure/key-vault/managed-hsm/overview for more details.")
39
39
logFormatJSON=flag.Bool("log-format-json", false, "set log formatter to json")
40
+
logLevel=flag.Int("v", 0, "In order of increasing verbosity: 0=warning/error, 2=info, 4=debug, 6=trace, 10=all")
40
41
// TODO remove this flag in future release.
41
42
_=flag.String("configFilePath", "/etc/kubernetes/azure.json", "[DEPRECATED] Path for Azure Cloud Provider config file")
42
43
configFilePath=flag.String("config-file-path", "/etc/kubernetes/azure.json", "Path for Azure Cloud Provider config file")
@@ -54,38 +55,39 @@ var (
54
55
)
55
56
56
57
funcmain() {
57
-
klog.InitFlags(nil)
58
+
iferr:=setupKMSPlugin(); err!=nil {
59
+
mlog.Fatal(err)
60
+
}
61
+
}
62
+
63
+
funcsetupKMSPlugin() error {
64
+
defermlog.Setup()() // set up log flushing and attempt to flush on exit
0 commit comments