Exemplo n.º 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)
}
Exemplo n.º 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...)
}
Exemplo n.º 3
0
func (r *raftLogger) Infof(format string, v ...interface{}) {
	if log.V(2) {
		log.InfofDepth(context.TODO(), 1, r.logPrefix()+format, v...)
	}
}
Exemplo n.º 4
0
func (r *raftLogger) Info(v ...interface{}) {
	if log.V(2) {
		log.InfofDepth(context.TODO(), 1, r.logPrefix(), v...)
	}
}
Exemplo n.º 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)
}
Exemplo n.º 6
0
func (r *raftLogger) Debugf(format string, v ...interface{}) {
	if log.V(3) {
		log.InfofDepth(1, r.logPrefix()+format, v...)
	}
}
Exemplo n.º 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)
}
Exemplo n.º 8
0
func (r *raftLogger) Debug(v ...interface{}) {
	if log.V(3) {
		log.InfofDepth(1, r.logPrefix(), v...)
	}
}
Exemplo n.º 9
0
func (*logger) Println(args ...interface{}) {
	log.InfofDepth(2, "", args...)
}
Exemplo n.º 10
0
func (*logger) Printf(format string, args ...interface{}) {
	log.InfofDepth(2, format, args...)
}
Exemplo n.º 11
0
func (*logger) Println(args ...interface{}) {
	log.InfofDepth(context.TODO(), 2, "", args...)
}
Exemplo n.º 12
0
func (*logger) Printf(format string, args ...interface{}) {
	log.InfofDepth(context.TODO(), 2, format, args...)
}
Exemplo n.º 13
0
func (logger) Print(args ...interface{}) {
	log.InfofDepth(1, "", args...)
}