Skip to content

Commit

Permalink
fix: handler log init
Browse files Browse the repository at this point in the history
  • Loading branch information
zengchen221 committed Sep 17, 2019
1 parent a931639 commit 921961f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package rpc
import (
"context"
"encoding/json"
"log"
"os"
"reflect"
"strconv"
"strings"
Expand Down Expand Up @@ -81,7 +83,7 @@ func newHandler(connCtx context.Context, conn jsonWriter, idgen func() ID, reg *
cancelRoot: cancelRoot,
allowSubscribe: true,
serverSubs: make(map[ID]*Subscription),
log: &defaultLog{},
log: &defaultLog{Logger: log.New(os.Stderr, "rpc ", log.LstdFlags)},
}
if conn.RemoteAddr() != "" {
//h.log = h.log.New("conn", conn.RemoteAddr())
Expand Down

0 comments on commit 921961f

Please sign in to comment.