[2.1] Add support for migrating logs from 2.0 to 2.1

- some code cleanup and refactors
+1 for me (again I kept the naming as it was in the code for 1.9)