refactor the code about log mr constants