Skip to content

Commit 68f4d22

Browse files
author
YangSen-qn
committed
chore: optimize log
1 parent ed89006 commit 68f4d22

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

iqshell/common/flow/flow.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (f *Flow) Start() {
119119

120120
if workInfo == nil || workInfo.Work == nil {
121121
if !hasMore {
122-
log.Info("work producer get work completed")
122+
log.Debug("work producer get work completed")
123123
break
124124
} else {
125125
log.Info("work producer get work fail: work in empty")
@@ -198,14 +198,14 @@ func (f *Flow) Start() {
198198

199199
workCount := len(workList)
200200

201-
log.InfoF("work consumer get works, count:%d", workCount)
201+
log.DebugF("work consumer get works, count:%d", workCount)
202202

203203
_ = f.limitAcquire(workCount)
204204
// workRecordList 有数据则长度和 workList 长度相同
205205
workRecordList, workErr := worker.DoWork(workList)
206206
f.limitRelease(workCount)
207207

208-
log.InfoF("work consumer handle works, count:%d error:%+v", workCount, workErr)
208+
log.DebugF("work consumer handle works, count:%d error:%+v", workCount, workErr)
209209

210210
if len(workRecordList) == 0 && workErr != nil {
211211
log.ErrorF("Do Worker Error:%+v", workErr)

iqshell/common/utils/user_agent.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package utils
22

33
import (
44
"fmt"
5-
"github.com/qiniu/qshell/v2/iqshell/common/version"
65
"runtime"
6+
7+
"github.com/qiniu/qshell/v2/iqshell/common/version"
78
)
89

910
// 生成客户端代理名称
1011
func UserAgent() string {
11-
return fmt.Sprintf("QShell/%s (%s; %s; %s)", version.Version(), runtime.GOOS, runtime.GOARCH, runtime.Version())
12+
return fmt.Sprintf("QiniuQShell/%s (%s; %s; %s)", version.Version(), runtime.GOOS, runtime.GOARCH, runtime.Version())
1213
}

iqshell/storage/bucket/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func List(info ListApiInfo,
8585
}
8686

8787
info.init()
88-
log.DebugF("will list bucket:%s, suffixes:%s, prefix:%s", info.Bucket, info.Suffixes, info.Prefix)
88+
log.DebugF("will list bucket:%s, suffixes:%s, prefix:%s start:%s end:%s", info.Bucket, info.Suffixes, info.Prefix, info.StartTime, info.EndTime)
8989
shouldCheckPutTime := !info.StartTime.IsZero() || !info.EndTime.IsZero()
9090
shouldCheckSuffixes := len(info.Suffixes) > 0
9191
shouldCheckFileTypes := len(info.FileTypes) > 0

0 commit comments

Comments
 (0)