From 99a6e8f5d9fbd31404bf1f079f4a50fd5d179028 Mon Sep 17 00:00:00 2001 From: wreulicke Date: Fri, 17 Jan 2020 19:32:38 +0900 Subject: [PATCH] Revised log level --- clone.go | 3 +-- main.go | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clone.go b/clone.go index bc4af33..c593e05 100644 --- a/clone.go +++ b/clone.go @@ -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 diff --git a/main.go b/main.go index bc7deb1..f1a7b5b 100644 --- a/main.go +++ b/main.go @@ -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