本文整理汇总了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...)
}