grim/convey

466f881e1593
Parents a13a27a3ff4a
Children 900f3af1f02e
Use the logger for info/warning messages at startup
--- a/config/config.go Mon Oct 11 21:46:53 2021 -0500
+++ b/config/config.go Mon Oct 11 21:50:45 2021 -0500
@@ -20,6 +20,8 @@
import (
"fmt"
+ log "github.com/sirupsen/logrus"
+
"keep.imfreedom.org/grim/convey/metaplans"
"keep.imfreedom.org/grim/convey/plans"
"keep.imfreedom.org/grim/convey/tasks"
@@ -41,7 +43,7 @@
}
if err := task.Deprecated(); err != nil {
- fmt.Printf("warning: task %s: %s\n", name, err.Error())
+ log.Warnf("warning: task %s: %s", name, err.Error())
}
}
--- a/config/loader.go Mon Oct 11 21:46:53 2021 -0500
+++ b/config/loader.go Mon Oct 11 21:50:45 2021 -0500
@@ -42,7 +42,7 @@
// If the user selected the default and it didn't exist, attempt the
// default with a .yaml extension.
if os.IsNotExist(err) && filename == "convey.yml" {
- log.Infof("configuration file convey.yml not found, attempting convey.yaml instead.")
+ log.Infof("info: configuration file convey.yml not found, attempting convey.yaml instead.")
filename = "convey.yaml"
_, err = os.Stat(filename)
if err != nil {