Skip to content

Commit 11d71e6

Browse files
committed
Ignore default log file
1 parent 4dadcfd commit 11d71e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/cmd/ssh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func sshFn(cmd *cobra.Command, args []string) error {
130130
cmd.SetOut(cmd.OutOrStdout())
131131

132132
logOutput := "console"
133-
if firstLogFile := util.FindFirstLogPath(logFiles); firstLogFile != "" {
133+
if firstLogFile := util.FindFirstLogPath(logFiles); firstLogFile != "" && firstLogFile != defaultLogFile {
134134
logOutput = firstLogFile
135135
}
136136
if err := util.InitLog(logLevel, logOutput); err != nil {
@@ -699,7 +699,7 @@ var sshProxyCmd = &cobra.Command{
699699

700700
func sshProxyFn(cmd *cobra.Command, args []string) error {
701701
logOutput := "console"
702-
if firstLogFile := util.FindFirstLogPath(logFiles); firstLogFile != "" {
702+
if firstLogFile := util.FindFirstLogPath(logFiles); firstLogFile != "" && firstLogFile != defaultLogFile {
703703
logOutput = firstLogFile
704704
}
705705
if err := util.InitLog(logLevel, logOutput); err != nil {

0 commit comments

Comments
 (0)