console.error should be logger.error (as with sibling methods)