Log cursor

Not yet ready for review or merge.