From 29fb1515fa92b6197d23aa7bd961f006ca36b9d2 Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Fri, 25 Aug 2017 13:52:48 -0700 Subject: [PATCH] Issue #6: fix inconsistencies of when output goes to stdout vs. stderr --- saas/argocli/src/applatix.io/argo/cmd/cluster.go | 4 ++-- saas/argocli/src/applatix.io/argo/cmd/job.go | 2 +- saas/argocli/src/applatix.io/argo/cmd/login.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/saas/argocli/src/applatix.io/argo/cmd/cluster.go b/saas/argocli/src/applatix.io/argo/cmd/cluster.go index 1d998db99cd1..d624c6a1d3fa 100644 --- a/saas/argocli/src/applatix.io/argo/cmd/cluster.go +++ b/saas/argocli/src/applatix.io/argo/cmd/cluster.go @@ -65,10 +65,10 @@ func clusterShell(cmd *cobra.Command, args []string) { homePath := usr.HomeDir clusterManagerImage := fmt.Sprintf("%s/%s/axclustermanager:%s", registry, namespace, version) - log.Printf("Getting the most up to date docker image (%s) for cluster management...\n", clusterManagerImage) + fmt.Printf("Getting the most up to date docker image (%s) for cluster management...\n", clusterManagerImage) runCmdTTY(dockerPath, "pull", clusterManagerImage) - log.Println("Entering cluster management shell...") + fmt.Println("Entering cluster management shell...") volAWS := fmt.Sprintf("%s/.aws:/root/.aws", homePath) volKube := fmt.Sprintf("%s/.kube:/tmp/ax_kube", homePath) volSSH := fmt.Sprintf("%s/.ssh:/root/.ssh", homePath) diff --git a/saas/argocli/src/applatix.io/argo/cmd/job.go b/saas/argocli/src/applatix.io/argo/cmd/job.go index ebfdd12a0cd1..6170845567b2 100644 --- a/saas/argocli/src/applatix.io/argo/cmd/job.go +++ b/saas/argocli/src/applatix.io/argo/cmd/job.go @@ -370,7 +370,7 @@ func jobLogs(cmd *cobra.Command, args []string) { if err != nil { log.Fatalf("Failed to decode line '%s': %v", string(line), err) } - log.Print(jl.Log) + fmt.Print(jl.Log) } default: diff --git a/saas/argocli/src/applatix.io/argo/cmd/login.go b/saas/argocli/src/applatix.io/argo/cmd/login.go index a4511cc469e4..21eb539e8432 100644 --- a/saas/argocli/src/applatix.io/argo/cmd/login.go +++ b/saas/argocli/src/applatix.io/argo/cmd/login.go @@ -123,6 +123,6 @@ var loginCmd = &cobra.Command{ if err != nil { log.Fatalf("Failed to write config file: %v\n", err) } - log.Printf("Config written to: %s\n", configPath) + fmt.Printf("Config written to: %s\n", configPath) }, }