Refactored log assertions.