From bad7d42bb610048a772438759331ad8e73147f68 Mon Sep 17 00:00:00 2001 From: vinllen Date: Mon, 22 Apr 2019 17:28:55 +0800 Subject: [PATCH] add debug log of sending and receiving command2 --- src/redis-shake/sync.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/redis-shake/sync.go b/src/redis-shake/sync.go index 51b8cdf..dab1e45 100644 --- a/src/redis-shake/sync.go +++ b/src/redis-shake/sync.go @@ -24,6 +24,7 @@ import ( "redis-shake/base" "redis-shake/heartbeat" "redis-shake/metric" + "unsafe" ) type delayNode struct { @@ -478,7 +479,7 @@ func (cmd *CmdSync) SyncCommand(reader *bufio.Reader, target, auth_type, passwd if conf.Options.LogLevel == utils.LogLevelAll { strArgv := make([]string, len(argv)) for i, ele := range argv { - strArgv[i] = string(ele) + strArgv[i] = *(*string)(unsafe.Pointer(&ele)) } log.Debugf("send command: [%s %v]", scmd, strArgv) }