Refactor Error logger test and implementation.