2.0 migrate legacy lucene log

This also fixes the build issue on Windows.
Looks like this method needs some try-finally clauses, right?