Skip to content

Commit

Permalink
Revised log level
Browse files Browse the repository at this point in the history
  • Loading branch information
wreulicke committed Jan 17, 2020
1 parent 675b3c8 commit 99a6e8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ func (c *Copier) copyFile(fs billy.Filesystem, f os.FileInfo, base []string) err
if !strings.HasPrefix(p, c.prefix) {
return nil
}
c.logger.Infof("%s %s", filepath.Join(c.dest, filepath.Join(base...)), c.prefix)
destPath := filepath.Join(c.dest, strings.TrimPrefix(filepath.Join(base...), c.prefix))
basePath := filepath.Dir(destPath)
c.logger.Infof("matched! copy %s to %s", p, destPath)
c.logger.Debugf("matched! copy %s to %s", p, destPath)
err := mkdirRecursively(basePath)
if err != nil {
return err
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ func NewCommand() *cobra.Command {
if !strings.HasSuffix(prefix, "/") {
prefix = prefix + "/"
}
return Clone(logrus.New(), u, prefix, dest)
l := logrus.New()
l.SetLevel(logrus.InfoLevel)
return Clone(l, u, prefix, dest)
},
}
return cmd
Expand Down

0 comments on commit 99a6e8f

Please sign in to comment.