Skip to content

Commit ca4a8f5

Browse files
authored
Merge pull request #16 from ad-m/log-level
Fix log-level flag support
2 parents 126d9a3 + 1b4893f commit ca4a8f5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

redirect/convert.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ var (
99
boolflags = []string{
1010
"--debug", "-D",
1111
"--verbose",
12-
"--log-level",
13-
"--l",
1412
"--tls",
1513
"--tlsverify",
1614
}
@@ -20,6 +18,7 @@ var (
2018
"--tlscert",
2119
"--tlskey",
2220
"--host", "-H",
21+
"--log-level", "-l",
2322
"--context",
2423
}
2524
)

redirect/convert_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ func Test_convert(t *testing.T) {
6363
args: []string{"exec", "mongo", "mongo", "--host", "mongo"},
6464
want: []string{"compose", "exec", "mongo", "mongo", "--host", "mongo"}, // --host is passed to exec
6565
},
66+
{
67+
name: "issues/12",
68+
args: []string{"--log-level", "INFO", "up"},
69+
want: []string{"--log-level", "INFO", "compose", "up"},
70+
},
71+
6672
}
6773
for _, tt := range tests {
6874
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)