Skip to content

Commit

Permalink
prepare README for 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cleaning-agent committed Nov 24, 2023
1 parent 62c838e commit b6712ac
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ logCapture.assertLoggedInOrder(
* [MDC content](#mdc-content)
* [Exceptions](#exceptions)
* [Markers](#markers)
* [Key-Value](#key-value)
* [Logger name](#logger-name)
* [Examples](#examples)
* [Unit Test Example:](#unit-test-example)
Expand All @@ -49,6 +50,7 @@ logCapture.assertLoggedInOrder(
* [Cucumber example](#cucumber-example)
* [Cucumber feature file](#cucumber-feature-file)
* [Changes](#changes)
* [4.0.0](#400)
* [3.6.1](#361)
* [3.6.0](#360)
* [3.5.0](#350)
Expand All @@ -73,7 +75,7 @@ Add log-capture as a test dependency to your project. If you use Maven, add this
<dependency>
<groupId>de.dm.infrastructure</groupId>
<artifactId>log-capture</artifactId>
<version>3.6.1</version>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
```
Expand Down Expand Up @@ -130,6 +132,18 @@ log.info(MarkerFactory.getMarker("my-marker"), "hello with marker");
logCapture.assertLogged(info("hello with marker", marker("my-marker")));
```

#### Key-Value

```java
import static de.dm.infrastructure.logcapture.ExpectedKeyValue.keyValue;

...

log.atInfo().setMessage("hello").addKeyValue("meaning", 42).log();

logCapture.assertLogged(info("hello", keyValue("meaning", 42)))
```

#### Logger name

```java
Expand Down Expand Up @@ -309,6 +323,13 @@ And with MDC logging context

## Changes

### 4.0.0

* **breaking change:** log-capture now requires Java 17
* **breaking change:** all deprecated parts have been removed
* added a new log event matcher [for key-value content](#key-value)
* lots of dependency updates

### 3.6.1

* Fixed a misleading and wrong assertion message. The assertion itself was correct, but the message always said all matchers did not match when only a subset did not match.
Expand Down

0 comments on commit b6712ac

Please sign in to comment.