summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/init.go b/init.go
index a4763a9..644ee74 100644
--- a/init.go
+++ b/init.go
@@ -26,7 +26,7 @@ func Init() *Forge {
f.Machine = new(zoopb.Machine)
if err := f.Machine.ConfigLoad(); err != nil {
- log.Warn("zoopb.ConfigLoad() failed", err)
+ log.Log(WARN, "zoopb.ConfigLoad() failed", err)
}
if f.Config.Username == "" {
usr, _ := user.Current()
@@ -40,9 +40,9 @@ func Init() *Forge {
f.ScanGoSrc()
end := f.Repos.Len()
if (end - start) == 0 {
- log.Info("forgepb.Scan() Scan did not find new git repositories. Total =", end)
+ log.Log(INFO, "forgepb.Scan() Scan did not find new git repositories. Total =", end)
} else {
- log.Info("forgepb.Scan() Scan found", end-start, "new git repositories. Total =", end)
+ log.Log(INFO, "forgepb.Scan() Scan found", end-start, "new git repositories. Total =", end)
}
f.rillUpdate(20, 10)
@@ -51,7 +51,7 @@ func Init() *Forge {
f.ConfigSave()
f.configSave = false
}
- log.Info("update() check took", shell.FormatDuration(time.Since(now)))
+ log.Log(INFO, "update() check took", shell.FormatDuration(time.Since(now)))
return f
}
@@ -64,7 +64,7 @@ func InitPB() *Forge {
if gosrc == "" {
goSrcDir, err := f.findGoSrc()
if err != nil {
- log.Warn("forge init() findGoSrc()", err)
+ log.Log(WARN, "forge init() findGoSrc()", err)
}
os.Setenv("FORGE_GOSRC", goSrcDir)
}
@@ -83,18 +83,18 @@ func InitPB() *Forge {
}
// print out the settings that will be used
- log.Info("forgepb.Init() FORGE_CONFIG", os.Getenv("FORGE_CONFIG"))
+ log.Log(INFO, "forgepb.Init() FORGE_CONFIG", os.Getenv("FORGE_CONFIG"))
// load the ~/.config/forge/ config
f.Config = new(ForgeConfigs)
if err := f.Config.ConfigLoad(); err != nil {
- log.Warn("forgepb.ConfigLoad() failed", err)
+ log.Log(WARN, "forgepb.ConfigLoad() failed", err)
}
if f.IsGoWork() {
- log.Info("forgepb.Init() FORGE_GOSRC ", os.Getenv("FORGE_GOSRC"), "(go.work = true)")
+ log.Log(INFO, "forgepb.Init() FORGE_GOSRC ", os.Getenv("FORGE_GOSRC"), "(go.work = true)")
} else {
- log.Info("forgepb.Init() FORGE_GOSRC ", os.Getenv("FORGE_GOSRC"), "(go.work = false)")
+ log.Log(INFO, "forgepb.Init() FORGE_GOSRC ", os.Getenv("FORGE_GOSRC"), "(go.work = false)")
}
f.Repos = new(gitpb.Repos)
f.Repos.ConfigLoad()