Add option to provide log verbosity (#23)

This commit is contained in:
Shubham Agrawal
2021-08-20 16:38:35 +05:30
committed by GitHub
parent e65b7b3ada
commit dbd6efc157
4 changed files with 26 additions and 3 deletions
+6
View File
@@ -132,6 +132,11 @@ func main() {
Usage: "Set this flag if you only want to build the image, without pushing to a registry",
EnvVar: "PLUGIN_NO_PUSH",
},
cli.StringFlag{
Name: "verbosity",
Usage: "Set this flag with value as oneof <panic|fatal|error|warn|info|debug|trace> to set the logging level for kaniko. Defaults to info.",
EnvVar: "PLUGIN_VERBOSITY",
},
}
if err := app.Run(os.Args); err != nil {
@@ -161,6 +166,7 @@ func run(c *cli.Context) error {
CacheTTL: c.Int("cache-ttl"),
DigestFile: defaultDigestFile,
NoPush: c.Bool("no-push"),
Verbosity: c.String("verbosity"),
},
Artifact: kaniko.Artifact{
Tags: c.StringSlice("tags"),
+6
View File
@@ -122,6 +122,11 @@ func main() {
Usage: "Set this flag if you only want to build the image, without pushing to a registry",
EnvVar: "PLUGIN_NO_PUSH",
},
cli.StringFlag{
Name: "verbosity",
Usage: "Set this flag with value as oneof <panic|fatal|error|warn|info|debug|trace> to set the logging level for kaniko. Defaults to info.",
EnvVar: "PLUGIN_VERBOSITY",
},
}
if err := app.Run(os.Args); err != nil {
@@ -150,6 +155,7 @@ func run(c *cli.Context) error {
CacheTTL: c.Int("cache-ttl"),
DigestFile: defaultDigestFile,
NoPush: c.Bool("no-push"),
Verbosity: c.String("verbosity"),
},
Artifact: kaniko.Artifact{
Tags: c.StringSlice("tags"),
+6
View File
@@ -118,6 +118,11 @@ func main() {
Usage: "Set this flag if you only want to build the image, without pushing to a registry",
EnvVar: "PLUGIN_NO_PUSH",
},
cli.StringFlag{
Name: "verbosity",
Usage: "Set this flag as --verbosity=<panic|fatal|error|warn|info|debug|trace> to set the logging level for kaniko. Defaults to info.",
EnvVar: "PLUGIN_VERBOSITY",
},
}
if err := app.Run(os.Args); err != nil {
@@ -150,6 +155,7 @@ func run(c *cli.Context) error {
CacheTTL: c.Int("cache-ttl"),
DigestFile: defaultDigestFile,
NoPush: c.Bool("no-push"),
Verbosity: c.String("verbosity"),
},
Artifact: kaniko.Artifact{
Tags: c.StringSlice("tags"),