private void ThrowLogMatchException(bool shouldHave, LogLevel level, string text, bool isRegex) => throw new AssertActualExpectedException(shouldHave, !shouldHave, string.Format("Expected log {0} the {1} \"{2}\" at level {3}\n\nActual log output follows:\n{4}", shouldHave ? "to have" : "not to have", isRegex ? "pattern" : "exact message", text, level, LogCapture.ToString()));