Added prints on startup
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 18 May 2017 21:17:04 +0000 (23:17 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 18 May 2017 21:19:43 +0000 (23:19 +0200)
lib/webserver/server.go
main.go

index 0905c77..774195c 100644 (file)
@@ -1,6 +1,7 @@
 package webserver
 
 import (
+       "fmt"
        "net/http"
        "os"
 
@@ -113,6 +114,7 @@ func (s *Server) Serve() error {
        // Serve in the background
        serveError := make(chan error, 1)
        go func() {
+               fmt.Printf("Web Server running on localhost:%s ...\n", s.cfg.HTTPPort)
                serveError <- http.ListenAndServe(":"+s.cfg.HTTPPort, s.router)
        }()
 
diff --git a/main.go b/main.go
index 6594bdb..69f6676 100644 (file)
--- a/main.go
+++ b/main.go
@@ -132,16 +132,17 @@ func xdsApp(cliCtx *cli.Context) error {
                if err != nil {
                        return cli.NewExitError(err, 2)
                }
-               ctx.Log.Infof("Syncthing started (PID %d)", ctx.SThgCmd.Process.Pid)
+               fmt.Printf("Syncthing started (PID %d)\n", ctx.SThgCmd.Process.Pid)
 
                ctx.Log.Infof("Starting Syncthing-inotify...")
                ctx.SThgInotCmd, err = ctx.SThg.StartInotify()
                if err != nil {
                        return cli.NewExitError(err, 2)
                }
-               ctx.Log.Infof("Syncthing-inotify started (PID %d)", ctx.SThgInotCmd.Process.Pid)
+               fmt.Printf("Syncthing-inotify started (PID %d)\n", ctx.SThgInotCmd.Process.Pid)
 
                // Establish connection with local Syncthing (retry if connection fail)
+               fmt.Printf("Establishing connection with Syncthing...\n")
                time.Sleep(2 * time.Second)
                retry := 10
                err = nil