Skip to content

Commit

Permalink
feat: add kv log-format
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Dec 24, 2024
1 parent fd6965b commit 19c3894
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.6

require (
github.com/aws/aws-sdk-go v1.54.20
github.com/ekristen/libnuke v0.19.3-0.20241006053811-62434176922b
github.com/ekristen/libnuke v0.19.3-0.20241006060217-60ab37420cea
github.com/fatih/color v1.17.0
github.com/golang/mock v1.6.0
github.com/google/uuid v1.6.0
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ github.com/ekristen/libnuke v0.19.3-0.20241006053205-54f2d13f031c h1:O4en6xA3Uo4
github.com/ekristen/libnuke v0.19.3-0.20241006053205-54f2d13f031c/go.mod h1:DIN5VmrH6AUwaXc25RHcH/V+JKALdl16CN9iJvFtbK4=
github.com/ekristen/libnuke v0.19.3-0.20241006053811-62434176922b h1:GRW0OG3TP0HMtCStQkrR9RB8v1a2FAQXUIO21GnYj9o=
github.com/ekristen/libnuke v0.19.3-0.20241006053811-62434176922b/go.mod h1:DIN5VmrH6AUwaXc25RHcH/V+JKALdl16CN9iJvFtbK4=
github.com/ekristen/libnuke v0.19.3-0.20241006055534-9f6008b7a6bd h1:91btyxCOv3NGFibfeLp1Z4Pu5pJv/xVf/2RhDwNrKZs=
github.com/ekristen/libnuke v0.19.3-0.20241006055534-9f6008b7a6bd/go.mod h1:DIN5VmrH6AUwaXc25RHcH/V+JKALdl16CN9iJvFtbK4=
github.com/ekristen/libnuke v0.19.3-0.20241006060217-60ab37420cea h1:JAijGxg3Dq9CGjnzN9OPRXBHJP0gzyv+we8UijpKvHU=
github.com/ekristen/libnuke v0.19.3-0.20241006060217-60ab37420cea/go.mod h1:DIN5VmrH6AUwaXc25RHcH/V+JKALdl16CN9iJvFtbK4=
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
Expand Down
5 changes: 5 additions & 0 deletions pkg/commands/global/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ func Before(c *cli.Context) error {
switch c.String("log-format") {
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
case "kv":
logrus.SetFormatter(&logrus.TextFormatter{
DisableColors: true,
FullTimestamp: true,
})
default:
logrus.SetFormatter(logFormatter)
}
Expand Down

0 comments on commit 19c3894

Please sign in to comment.