[WIP] Log rewrite