Currently the Log() function only takes one argument. Pratap suggested making this variadic. This would be beneficial in cases where we log variables one after the other.
E.g.:
func main() {
pmem.Init("database")
var head *node
n := pnew(node)
head = (*node)(pmem.New(”hd", head))
tx := transaction.NewUndoTx()
tx.Begin()
tx.Log(head)
tx.Log(n)
n.next = head.next
head.next = n
tx.End()
transaction.Release(tx)
}
Here the two separate log statements could be combined as follows:
Currently the
Log()
function only takes one argument. Pratap suggested making this variadic. This would be beneficial in cases where we log variables one after the other.E.g.:
Here the two separate log statements could be combined as follows: