From b6712ac53bf3ac1998e51cab009b0d3645c2862f Mon Sep 17 00:00:00 2001 From: Daniel Flassak Date: Fri, 24 Nov 2023 16:46:31 +0100 Subject: [PATCH] prepare README for 4.0.0 --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 34882d5..6ef6e1f 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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) @@ -73,7 +75,7 @@ Add log-capture as a test dependency to your project. If you use Maven, add this de.dm.infrastructure log-capture - 3.6.1 + 4.0.0 test ``` @@ -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 @@ -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.