AssertNoWarningsOrErrors
public void AssertNoWarningsOrErrors() Asserts that no warnings or errors were logged, throwing an exception if any exist.
Exceptions
System.InvalidOperationException- Thrown when warnings or errors exist in the log.
InMemoryLogger instances share. Useful for simulation testing where logs need to be captured and inspected. public void AssertNoWarningsOrErrors()System.InvalidOperationExceptionpublic void Clear()public string FormatAllEntries()public (string Content, long SizeBytes) InMemoryLogBuffer.FormatAllEntriesWithSize()public string FormatEntries(LogLevel minimumLevel)minimumLevelLogLevelpublic (string Content, long SizeBytes) InMemoryLogBuffer.FormatEntriesWithSize(LogLevel minimumLevel)minimumLevelLogLevelpublic IEnumerable<LogEntry> GetEntries(LogLevel minimumLevel)minimumLevelLogLevelpublic bool HasEntriesAtOrAbove(LogLevel level)levelLogLevelpublic void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter, string category)logLevelLogLeveleventIdEventIdstateTStateexceptionException?formatterFunc<TState, Exception?, string>categorystring