Log tool refactoring