Simplified code in testerrorlogger by reusing constant object.