@@ -156,7 +156,7 @@ func (this *XesRedis) goRoutine() {
156
156
res := this .exec ()
157
157
if res .err != nil {
158
158
//this.String() called inside this.exec().
159
- logger .Ex (this .ctx , this .loggerTag , this .keyName + " " + this .cmd + " RedisErr : %v" , res .err )
159
+ logger .Ex (this .ctx , this .loggerTag , this .keyName + " " + this .cmd + " xredisErr : %v" , res .err )
160
160
}
161
161
})
162
162
if ! result {
@@ -198,7 +198,7 @@ func (this *XesRedis) slowLog(start time.Time) {
198
198
}
199
199
cost := time .Now ().Sub (start )
200
200
if cost > threshold {
201
- logger .Ix (this .ctx , "XesRedis slowLog" , "redis instance %s, cmd %v, key %v, args %v, cost %v" , this .instance , this .cmd , this .key , this .args , cost )
201
+ logger .Ix (this .ctx , "xredis slowLog" , "redis instance %s, cmd %v, key %v, args %v, cost %v" , this .instance , this .cmd , this .key , this .args , cost )
202
202
}
203
203
return
204
204
}
@@ -217,7 +217,7 @@ func (this *XesRedis) warnSize(v interface{}) {
217
217
size = len (fmt .Sprint (vv ))
218
218
}
219
219
if size > maxSize {
220
- logger .Ix (this .ctx , "XesRedis warnSize" , "redis instance %s, cmd %v, key %v, args %v, val szie %d" , this .instance , this .cmd , this .key , this .args , size )
220
+ logger .Ix (this .ctx , "xredis warnSize" , "redis instance %s, cmd %v, key %v, args %v, val szie %d" , this .instance , this .cmd , this .key , this .args , size )
221
221
}
222
222
return
223
223
}
@@ -246,7 +246,7 @@ func (this *XesRedis) exec() RedisResult {
246
246
newcmd = append (newcmd , v )
247
247
}
248
248
249
- logger .Dx (this .ctx , "XesRedis exec()" , "redis instance %s, redis cmd %v" , this .instance , newcmd )
249
+ logger .Dx (this .ctx , "xredis exec()" , "redis instance %s, redis cmd %v" , this .instance , newcmd )
250
250
251
251
cmd := redis .NewCmd (newcmd ... )
252
252
if this .goPipeLine {
@@ -255,7 +255,7 @@ func (this *XesRedis) exec() RedisResult {
255
255
256
256
client := GetClient (this .instance )
257
257
if client == nil {
258
- logger .Wx (this .ctx , "Redisdao .exec.ClientNil" , "GetClient is nil, Instance : %v" , this .instance )
258
+ logger .Wx (this .ctx , "xredis .exec.ClientNil" , "GetClient is nil, Instance : %v" , this .instance )
259
259
return RedisResult {err : logger .NewError ("[exec] GetClient is nil" )}
260
260
}
261
261
@@ -265,9 +265,9 @@ func (this *XesRedis) exec() RedisResult {
265
265
res .err = err
266
266
if err != nil {
267
267
if err == redis .Nil {
268
- logger .Dx (this .ctx , "Redisdao .exec.RedisNil" , "redis cmd %v, err msg %v" , newcmd , err )
268
+ logger .Dx (this .ctx , "xredis .exec.RedisNil" , "redis cmd %v, err msg %v" , newcmd , err )
269
269
} else {
270
- logger .Ex (this .ctx , "Redisdao .exec.RedisError" , "redis cmd %+v, err %v, info: %+v" , newcmd , err , this .String ())
270
+ logger .Ex (this .ctx , "xredis .exec.RedisError" , "redis cmd %+v, err %v, info: %+v" , newcmd , err , this .String ())
271
271
}
272
272
}
273
273
this .warnSize (res .value )
@@ -285,7 +285,7 @@ func (this *XesRedis) OpenPipeLine() {
285
285
for k , _ := range GetSelectors () {
286
286
client := GetClient (k )
287
287
if client == nil {
288
- logger .Ex (this .ctx , "Redisdao .OpenPipeLine" , "GetClient fail:%v" , k )
288
+ logger .Ex (this .ctx , "xredis .OpenPipeLine" , "GetClient fail:%v" , k )
289
289
continue
290
290
}
291
291
pip := & PipelineIns {client .Pipeline (), false }
@@ -314,7 +314,7 @@ func (this *XesRedis) ExecPipeLine() (ret []RedisResult, errs []error) {
314
314
defer wg .Done ()
315
315
cmder , err := pip .pipeliner .Exec ()
316
316
if err != nil && err != redis .Nil {
317
- logger .Ex (this .ctx , "Redisdao .ExecPipeLine" , "Pipeline execute error %v" , err )
317
+ logger .Ex (this .ctx , "xredis .ExecPipeLine" , "Pipeline execute error %v" , err )
318
318
lo .Lock ()
319
319
errs = append (errs , err )
320
320
lo .Unlock ()
@@ -324,13 +324,13 @@ func (this *XesRedis) ExecPipeLine() (ret []RedisResult, errs []error) {
324
324
var result RedisResult
325
325
result .err = cmd .Err ()
326
326
if result .err != nil && result .err != redis .Nil {
327
- logger .Ex (this .ctx , "Redisdao .ExecPipeLine" , "Pipeline execute %v command args %v, err %v" , cmd .Name (), cast .ToStringSlice (cmd .Args ()), cmd .Err ())
327
+ logger .Ex (this .ctx , "xredis .ExecPipeLine" , "Pipeline execute %v command args %v, err %v" , cmd .Name (), cast .ToStringSlice (cmd .Args ()), cmd .Err ())
328
328
} else {
329
329
tmpcmd , ok := cmd .(* redis.Cmd )
330
330
if ok {
331
331
result .value , _ = tmpcmd .Result ()
332
332
} else {
333
- result .err = logger .NewError ("Redisdao .ExecPipeLine assert cmd fail" )
333
+ result .err = logger .NewError ("xredis .ExecPipeLine assert cmd fail" )
334
334
}
335
335
}
336
336
lo .Lock ()
@@ -385,7 +385,7 @@ func (this *XesRedis) String() (back string) {
385
385
if err != nil {
386
386
return str
387
387
}
388
- logger .Ex (this .ctx , "XesRedis " , "String str %v" , str )
388
+ logger .Ex (this .ctx , "xredis " , "String str %v" , str )
389
389
if GetEnableKafka () {
390
390
this .sendKafka ("xes_redis_err" , []byte (str ))
391
391
}
0 commit comments