refactoring logging class