Skip to content

Commit

Permalink
add tip to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cleaning-agent committed Feb 5, 2025
1 parent 4efeb00 commit 331cd86
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

Simple assertions for log messages. See [Examples](#examples).

> [!NOTE]
> log-capture asserts evaluated log statements. That means it depends on a logging implementation (*logback*), but works with any logging facade (*slf4j* and others)
```java
var name="world";
log.info("hello {}", name);
Expand All @@ -32,6 +29,12 @@ logCapture.assertLoggedInOrder(
);
```

> [!TIP]
> **Advantages of log-capture:**
>
> * log-capture does not capture console output (unlinke [OutputCaptureExtension](https://docs.spring.io/spring-boot/api/java/org/springframework/boot/test/system/OutputCaptureExtension.html) for example). This is why it can assert logs independently from the configured log-appender.
> * log-capture asserts evaluated log statements. That means it depends on a logging implementation (*logback*), but works with any logging facade (like *slf4j* and others).
**Table of Contents**

* [Usage](#usage)
Expand Down

0 comments on commit 331cd86

Please sign in to comment.