refactoring Log class