Remove duplicated code in NOPLogger