make use of micro/go-log

This commit is contained in:
Asim Aslam
2017-05-11 20:43:42 +01:00
parent 39fb03fba6
commit bab586b71e
6 changed files with 31 additions and 29 deletions

View File

@@ -2,11 +2,11 @@
package server
import (
"log"
"os"
"os/signal"
"syscall"
"github.com/micro/go-log"
"github.com/pborman/uuid"
"golang.org/x/net/context"
)
@@ -140,7 +140,7 @@ func Run() error {
ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGTERM, syscall.SIGINT, syscall.SIGKILL)
log.Printf("Received signal %s", <-ch)
log.Logf("Received signal %s", <-ch)
if err := DefaultServer.Deregister(); err != nil {
return err
@@ -152,13 +152,13 @@ func Run() error {
// Start starts the default server
func Start() error {
config := DefaultServer.Options()
log.Printf("Starting server %s id %s", config.Name, config.Id)
log.Logf("Starting server %s id %s", config.Name, config.Id)
return DefaultServer.Start()
}
// Stop stops the default server
func Stop() error {
log.Printf("Stopping server")
log.Logf("Stopping server")
return DefaultServer.Stop()
}