improve the code quality: log monitor