@cryptotaxi247 / kubo / commits / 55896a86d

logs(2/main) place log statements approppriately

License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Brian Tiger Chow committed Nov 15, 2014 at 18:31 UTC 55896a86d669a54ba76bbc9c883c7b36ffbf67c7
1 file changed +3 -1
cmd/ipfs2/main.go
+3 -1
@@ -353,13 +353,15 @@ func commandShouldRunOnDaemon(details cmdDetails, req cmds.Request, root *cmds.C
353 return false, nil
354 }
355
356 + log.Info("looking for running daemon...")
357 // at this point need to know whether daemon is running. we defer
358 // to this point so that some commands dont open files unnecessarily.
359 daemonLocked := daemon.Locked(req.Context().ConfigRoot)
359 - log.Info("Daemon is running.")
360
361 if daemonLocked {
362
363 + log.Info("a daemon is running...")
364 +
365 if details.cannotRunOnDaemon {
366 e := "ipfs daemon is running. please stop it to run this command"
367 return false, cmds.ClientError(e)