refactor Logger