Releases: dm-drogeriemarkt/log-capture
Releases · dm-drogeriemarkt/log-capture
4.1.0 - times(...), atMost(...), atLeast(...) and once()
- Feature: Added method to test number of log message repetitions via
times(...)
,once()
,atMost(...)
andatLeast(...)
(thanks @Laksuh) - Improvement: Better readability of assertion messages
Example
assertion message before:
Expected log message has occurred, but never with the expected MDC value: Level: WARN, Regex: "bye world"
captured message: "bye world"
expected MDC key: another_key
expected MDC value: ".*another_value.*"
captured MDC values:"
key: "value"
assertion message now:
Expected log message has occurred, but never with the expected MDC value:
message: WARN "bye world" (regex)
captured message: "bye world"
expected MDC key: another_key
expected MDC value: ".*another_value.*"
captured MDC values:
key: "value"
4.0.1 - Dependency updates
Updated dependencies due to logback vulnerability
4.0.0 - new key-value matcher and some breaking changes
- 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
- lots of dependency updates
3.6.2 - fix assertion message
Fixes an assertion message concerning captured Exceptions.
Correct message of assertion
- BUGFIX 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.
Remove ExpectedKeyValue
Removed ExpectedKeyValue again due to an API change in Logstash without a workaround
Assertions for StructuredArguments.keyValue
- Added new Log Event Matcher:
ExpectedKeyValue.keyValue(...)
to assertStructuredArguments.keyValue(...)
from Logstash - Improved readability for assertion errors when using
assertNotLogged(...)
- Updated dependencies
3.4.1 - Improved Javadoc for deprecated methods
Improved Javadoc for deprecated methods
3.4.0 - assertNotLogged() and other conveniences
- Added
assertNotLogged(...)
for asserting that no matching log message has been logged - Added more factory methods for
warn(...)
,error(...)
as a shortcut to ignore the message when matching - Added
any(...)
factory method for matching any log message regardless of level
3.3.0 with new fluent API and more assertions
- Introduced a new fluent API with
- better readability
- extensible log message assertions (to assert attached Exceptions, Markers and LoggerName beyond MDC content)
- Deprecated the old API (will be removed in 4.0)