*logging: refactoring