本文整理匯總了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)
}
示例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...)
}
示例3: Infof
func (r *raftLogger) Infof(format string, v ...interface{}) {
if log.V(2) {
log.InfofDepth(context.TODO(), 1, r.logPrefix()+format, v...)
}
}
示例4: Info
func (r *raftLogger) Info(v ...interface{}) {
if log.V(2) {
log.InfofDepth(context.TODO(), 1, r.logPrefix(), v...)
}
}
示例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)
}
示例6: Debugf
func (r *raftLogger) Debugf(format string, v ...interface{}) {
if log.V(3) {
log.InfofDepth(1, r.logPrefix()+format, v...)
}
}
示例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)
}
示例8: Debug
func (r *raftLogger) Debug(v ...interface{}) {
if log.V(3) {
log.InfofDepth(1, r.logPrefix(), v...)
}
}
示例9: Println
func (*logger) Println(args ...interface{}) {
log.InfofDepth(2, "", args...)
}
示例10: Printf
func (*logger) Printf(format string, args ...interface{}) {
log.InfofDepth(2, format, args...)
}
示例11: Println
func (*logger) Println(args ...interface{}) {
log.InfofDepth(context.TODO(), 2, "", args...)
}
示例12: Printf
func (*logger) Printf(format string, args ...interface{}) {
log.InfofDepth(context.TODO(), 2, format, args...)
}
示例13: Print
func (logger) Print(args ...interface{}) {
log.InfofDepth(1, "", args...)
}