mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 04:19:18 +08:00
3cc4209d26
relate: https://github.com/milvus-io/milvus/issues/28086 https://github.com/milvus-io/milvus/issues/28940 --------- Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
25 lines
437 B
Go
25 lines
437 B
Go
package connection
|
|
|
|
import (
|
|
"time"
|
|
|
|
"go.uber.org/zap"
|
|
|
|
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
|
)
|
|
|
|
type clientInfo struct {
|
|
*commonpb.ClientInfo
|
|
identifier int64
|
|
lastActiveTime time.Time
|
|
}
|
|
|
|
func (c *clientInfo) GetLogger() []zap.Field {
|
|
fields := ZapClientInfo(c.ClientInfo)
|
|
fields = append(fields,
|
|
zap.Int64("identifier", c.identifier),
|
|
zap.Time("last_active_time", c.lastActiveTime),
|
|
)
|
|
return fields
|
|
}
|