refactoring log module