Skip to content

Commit

Permalink
make logging consistent with current
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Jansson <[email protected]>
  • Loading branch information
andreasjansson committed Jan 6, 2021
1 parent 5af9906 commit b1b09ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions go/pkg/console/global.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package console

import (
"fmt"
"os"

"github.com/mattn/go-isatty"
Expand Down Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions go/pkg/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit b1b09ea

Please sign in to comment.