From b1b09ea31ecaa257df2cc401ff4d899b2d177e8b Mon Sep 17 00:00:00 2001 From: Andreas Jansson Date: Wed, 6 Jan 2021 19:37:46 +0100 Subject: [PATCH] make logging consistent with current Signed-off-by: Andreas Jansson --- go/pkg/console/global.go | 9 --------- go/pkg/project/project.go | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/go/pkg/console/global.go b/go/pkg/console/global.go index a8812781d..3366d4e40 100644 --- a/go/pkg/console/global.go +++ b/go/pkg/console/global.go @@ -1,7 +1,6 @@ package console import ( - "fmt" "os" "github.com/mattn/go-isatty" @@ -69,11 +68,3 @@ func DebugOutput(line string) { func IsTTY() bool { return isatty.IsTerminal(os.Stdout.Fd()) } - -func Truncate(msg string, v ...interface{}) string { - s := fmt.Sprintf(msg, v...) - if len(s) > truncateLength && truncateLength > 3 { - return s[:truncateLength-3] + "..." - } - return s -} diff --git a/go/pkg/project/project.go b/go/pkg/project/project.go index f0b2639ec..472c1f655 100644 --- a/go/pkg/project/project.go +++ b/go/pkg/project/project.go @@ -251,7 +251,7 @@ func (p *Project) CreateExperiment(args CreateExperimentArgs, async bool, workCh return err } if !quiet { - console.Info(console.Truncate("Created experiment %s, copied the files from %s to %s/%s", exp.ShortID(), exp.Path, p.repository.RootURL(), exp.StorageTarPath())) + console.Info("Created experiment %s, copied '%s' to '%s'...", exp.ShortID(), exp.Path, p.repository.RootURL()) } return nil } @@ -298,7 +298,7 @@ func (p *Project) CreateCheckpoint(args CreateCheckpointArgs, async bool, workCh return err } if !quiet { - console.Info(console.Truncate("Created checkpoint %s, copied the files from %s to %s/%s", chk.ShortID(), chk.Path, p.repository.RootURL(), chk.StorageTarPath())) + console.Info("Created checkpoint %s, copied '%s' to '%s'...", chk.ShortID(), chk.Path, p.repository.RootURL()) } return nil }