From 46da892e5ffd83e2a659cdef9a946895ef9f61e0 Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 15 Mar 2016 20:48:09 +0000 Subject: [PATCH] Remove glog from example too --- examples/server/wrapper/main.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/server/wrapper/main.go b/examples/server/wrapper/main.go index ad9485fa..8463af54 100644 --- a/examples/server/wrapper/main.go +++ b/examples/server/wrapper/main.go @@ -1,7 +1,8 @@ package main import ( - log "github.com/golang/glog" + "log" + "github.com/micro/go-micro/cmd" "github.com/micro/go-micro/examples/server/handler" "github.com/micro/go-micro/examples/server/subscriber" @@ -11,18 +12,18 @@ import ( func logWrapper(fn server.HandlerFunc) server.HandlerFunc { return func(ctx context.Context, req server.Request, rsp interface{}) error { - log.Infof("[Log Wrapper] Before serving request method: %v", req.Method()) + log.Printf("[Log Wrapper] Before serving request method: %v", req.Method()) err := fn(ctx, req, rsp) - log.Infof("[Log Wrapper] After serving request") + log.Printf("[Log Wrapper] After serving request") return err } } func logSubWrapper(fn server.SubscriberFunc) server.SubscriberFunc { return func(ctx context.Context, req server.Publication) error { - log.Infof("[Log Sub Wrapper] Before serving publication topic: %v", req.Topic()) + log.Printf("[Log Sub Wrapper] Before serving publication topic: %v", req.Topic()) err := fn(ctx, req) - log.Infof("[Log Sub Wrapper] After serving publication") + log.Printf("[Log Sub Wrapper] After serving publication") return err } }