Refactoring in Log class