Refactor UI logger