1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-09 12:40:35 +08:00

AUTH-2729 added log file and level to cmd flags to match config file settings

This commit is contained in:
Dalton
2020-06-05 10:18:40 -05:00
committed by Dalton Cherry
parent 2f70b05c64
commit f8638839c0
3 changed files with 37 additions and 11 deletions

View File

@@ -25,14 +25,16 @@ import (
)
const (
sshHostnameFlag = "hostname"
sshDestinationFlag = "destination"
sshURLFlag = "url"
sshHeaderFlag = "header"
sshTokenIDFlag = "service-token-id"
sshTokenSecretFlag = "service-token-secret"
sshGenCertFlag = "short-lived-cert"
sshConfigTemplate = `
sshHostnameFlag = "hostname"
sshDestinationFlag = "destination"
sshURLFlag = "url"
sshHeaderFlag = "header"
sshTokenIDFlag = "service-token-id"
sshTokenSecretFlag = "service-token-secret"
sshGenCertFlag = "short-lived-cert"
sshLogDirectoryFlag = "log-directory"
sshLogLevelFlag = "log-level"
sshConfigTemplate = `
Add to your {{.Home}}/.ssh/config:
Host {{.Hostname}}
@@ -154,6 +156,16 @@ func Commands() []*cli.Command {
Aliases: []string{"secret"},
Usage: "specify an Access service token secret you wish to use.",
},
&cli.StringFlag{
Name: sshLogDirectoryFlag,
Aliases: []string{"logfile"}, //added to match the tunnel side
Usage: "Save application log to this directory for reporting issues.",
},
&cli.StringFlag{
Name: sshLogLevelFlag,
Aliases: []string{"loglevel"}, //added to match the tunnel side
Usage: "Application logging level {fatal, error, info, debug}. ",
},
},
},
{