Skip to content

Commit 1e779f7

Browse files
ldeztraefiker
authored andcommitted
Fix some CLI bugs
1 parent fe68e9e commit 1e779f7

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

docs/content/reference/static-configuration/cli.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
--accesslog (Default: "false")
32
Access log settings.
43

@@ -173,6 +172,9 @@
173172
--hostresolver.resolvdepth (Default: "5")
174173
The maximal depth of DNS recursive resolving
175174

175+
--log (Default: "false")
176+
Traefik log settings.
177+
176178
--log.filepath (Default: "")
177179
Traefik log file path. Stdout is used when omitted or empty.
178180

docs/content/reference/static-configuration/env.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ resolv.conf used for DNS resolving (Default: ```/etc/resolv.conf```)
165165
`TRAEFIK_HOSTRESOLVER_RESOLVDEPTH`:
166166
The maximal depth of DNS recursive resolving (Default: ```5```)
167167

168+
`TRAEFIK_LOG`:
169+
Traefik log settings. (Default: "false")
170+
168171
`TRAEFIK_LOG_FILEPATH`:
169172
Traefik log file path. Stdout is used when omitted or empty.
170173

pkg/cli/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,5 @@ func contains(cmds []*Command, name string) bool {
128128
}
129129

130130
func isFlag(arg string) bool {
131-
return len(arg) > 0 && arg[1] == '-'
131+
return len(arg) > 0 && arg[0] == '-'
132132
}

pkg/config/static/static_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Configuration struct {
5555
Ping *ping.Handler `description:"Enable ping." export:"true" label:"allowEmpty"`
5656
// Rest *rest.Provider `description:"Enable Rest backend with default settings" export:"true"`
5757

58-
Log *types.TraefikLog `description:"Traefik log settings." export:"true"`
58+
Log *types.TraefikLog `description:"Traefik log settings." export:"true" label:"allowEmpty"`
5959
AccessLog *types.AccessLog `description:"Access log settings." export:"true" label:"allowEmpty"`
6060
Tracing *Tracing `description:"OpenTracing configuration." export:"true" label:"allowEmpty"`
6161

0 commit comments

Comments
 (0)