refactoring log messages