當前位置: 首頁>>代碼示例>>Golang>>正文


Golang log.InfofDepth函數代碼示例

本文整理匯總了Golang中github.com/cockroachdb/cockroach/util/log.InfofDepth函數的典型用法代碼示例。如果您正苦於以下問題:Golang InfofDepth函數的具體用法?Golang InfofDepth怎麽用?Golang InfofDepth使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了InfofDepth函數的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: insertCPutFn

// insertCPutFn is used by insertRow when conflicts should be respected.
// logValue is used for pretty printing.
func insertCPutFn(b *client.Batch, key *roachpb.Key, value *roachpb.Value) {
	// TODO(dan): We want do this V(2) log everywhere in sql. Consider making a
	// client.Batch wrapper instead of inlining it everywhere.
	if log.V(2) {
		log.InfofDepth(1, "CPut %s -> %s", *key, value.PrettyPrint())
	}
	b.CPut(key, value, nil)
}
開發者ID:YuleiXiao,項目名稱:cockroach,代碼行數:10,代碼來源:rowwriter.go

示例2: Infof

func (l queueLog) Infof(logv bool, format string, a ...interface{}) {
	if logv {
		log.InfofDepth(1, l.prefix+format, a...)
	}
	l.traceLog.Printf(format, a...)
}
開發者ID:petermattis,項目名稱:cockroach,代碼行數:6,代碼來源:queue.go

示例3: Infof

func (r *raftLogger) Infof(format string, v ...interface{}) {
	if log.V(2) {
		log.InfofDepth(context.TODO(), 1, r.logPrefix()+format, v...)
	}
}
開發者ID:yangxuanjia,項目名稱:cockroach,代碼行數:5,代碼來源:raft.go

示例4: Info

func (r *raftLogger) Info(v ...interface{}) {
	if log.V(2) {
		log.InfofDepth(context.TODO(), 1, r.logPrefix(), v...)
	}
}
開發者ID:yangxuanjia,項目名稱:cockroach,代碼行數:5,代碼來源:raft.go

示例5: insertPutFn

// insertPutFn is used by insertRow when conflicts should be ignored.
// logValue is used for pretty printing.
func insertPutFn(b *client.Batch, key *roachpb.Key, value *roachpb.Value) {
	if log.V(2) {
		log.InfofDepth(1, "Put %s -> %s", *key, value.PrettyPrint())
	}
	b.Put(key, value)
}
開發者ID:YuleiXiao,項目名稱:cockroach,代碼行數:8,代碼來源:rowwriter.go

示例6: Debugf

func (r *raftLogger) Debugf(format string, v ...interface{}) {
	if log.V(3) {
		log.InfofDepth(1, r.logPrefix()+format, v...)
	}
}
開發者ID:CubeLite,項目名稱:cockroach,代碼行數:5,代碼來源:raft.go

示例7: insertPutFn

// insertPutFn is used by insertRow when conflicts should be ignored.
// logValue is used for pretty printing.
func insertPutFn(b *client.Batch, key *roachpb.Key, value interface{}, logValue interface{}) {
	if log.V(2) {
		log.InfofDepth(1, "Put %s -> %v", *key, logValue)
	}
	b.Put(key, value)
}
開發者ID:mjibson,項目名稱:cockroach,代碼行數:8,代碼來源:rowwriter.go

示例8: Debug

func (r *raftLogger) Debug(v ...interface{}) {
	if log.V(3) {
		log.InfofDepth(1, r.logPrefix(), v...)
	}
}
開發者ID:CubeLite,項目名稱:cockroach,代碼行數:5,代碼來源:raft.go

示例9: Println

func (*logger) Println(args ...interface{}) {
	log.InfofDepth(2, "", args...)
}
開發者ID:CubeLite,項目名稱:cockroach,代碼行數:3,代碼來源:log.go

示例10: Printf

func (*logger) Printf(format string, args ...interface{}) {
	log.InfofDepth(2, format, args...)
}
開發者ID:CubeLite,項目名稱:cockroach,代碼行數:3,代碼來源:log.go

示例11: Println

func (*logger) Println(args ...interface{}) {
	log.InfofDepth(context.TODO(), 2, "", args...)
}
開發者ID:yangxuanjia,項目名稱:cockroach,代碼行數:3,代碼來源:log.go

示例12: Printf

func (*logger) Printf(format string, args ...interface{}) {
	log.InfofDepth(context.TODO(), 2, format, args...)
}
開發者ID:yangxuanjia,項目名稱:cockroach,代碼行數:3,代碼來源:log.go

示例13: Print

func (logger) Print(args ...interface{}) {
	log.InfofDepth(1, "", args...)
}
開發者ID:binlijin,項目名稱:cockroach,代碼行數:3,代碼來源:log.go


注:本文中的github.com/cockroachdb/cockroach/util/log.InfofDepth函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。