Example #1
0
// 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)
}
Example #2
0
func (l queueLog) Infof(logv bool, format string, a ...interface{}) {
	if logv {
		log.InfofDepth(1, l.prefix+format, a...)
	}
	l.traceLog.Printf(format, a...)
}
Example #3
0
func (r *raftLogger) Infof(format string, v ...interface{}) {
	if log.V(2) {
		log.InfofDepth(context.TODO(), 1, r.logPrefix()+format, v...)
	}
}
Example #4
0
func (r *raftLogger) Info(v ...interface{}) {
	if log.V(2) {
		log.InfofDepth(context.TODO(), 1, r.logPrefix(), v...)
	}
}
Example #5
0
// 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)
}
Example #6
0
func (r *raftLogger) Debugf(format string, v ...interface{}) {
	if log.V(3) {
		log.InfofDepth(1, r.logPrefix()+format, v...)
	}
}
Example #7
0
// 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)
}
Example #8
0
func (r *raftLogger) Debug(v ...interface{}) {
	if log.V(3) {
		log.InfofDepth(1, r.logPrefix(), v...)
	}
}
Example #9
0
func (*logger) Println(args ...interface{}) {
	log.InfofDepth(2, "", args...)
}
Example #10
0
func (*logger) Printf(format string, args ...interface{}) {
	log.InfofDepth(2, format, args...)
}
Example #11
0
func (*logger) Println(args ...interface{}) {
	log.InfofDepth(context.TODO(), 2, "", args...)
}
Example #12
0
func (*logger) Printf(format string, args ...interface{}) {
	log.InfofDepth(context.TODO(), 2, format, args...)
}
Example #13
0
func (logger) Print(args ...interface{}) {
	log.InfofDepth(1, "", args...)
}