1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

prune util/log and user logger (#1237)

* prune util/log and user logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* plaintext logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add newline

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Vasiliy Tolstov
2020-02-23 16:45:20 +03:00
committed by GitHub
parent ceed8942fc
commit 117f56ebf7
46 changed files with 159 additions and 486 deletions

View File

@ -10,8 +10,8 @@ import (
"github.com/google/uuid"
"github.com/micro/go-micro/v2/codec"
log "github.com/micro/go-micro/v2/logger"
"github.com/micro/go-micro/v2/registry"
log "github.com/micro/go-micro/v2/util/log"
)
// Server is a simple micro server abstraction
@ -200,7 +200,7 @@ func Run() error {
ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGTERM, syscall.SIGINT)
log.Logf("Received signal %s", <-ch)
log.Infof("Received signal %s", <-ch)
return Stop()
}
@ -208,13 +208,13 @@ func Run() error {
// Start starts the default server
func Start() error {
config := DefaultServer.Options()
log.Logf("Starting server %s id %s", config.Name, config.Id)
log.Infof("Starting server %s id %s", config.Name, config.Id)
return DefaultServer.Start()
}
// Stop stops the default server
func Stop() error {
log.Logf("Stopping server")
log.Infof("Stopping server")
return DefaultServer.Stop()
}