{"repo":"dm-drogeriemarkt/log-capture","free":true,"listed":false,"github":"https://github.com/dm-drogeriemarkt/log-capture","clone":"git clone https://github.com/dm-drogeriemarkt/log-capture.git","description":"assertions for logging with logback","language":"Java","stars":16,"topics":["logging","logger","junit","testing","java","automated-testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"log-capture Simple assertions for log messages. See Examples. It's even simple when there's more than just the message and level to assert: [!TIP] Advantages of log-capture: log-capture does not capture console output (unlinke OutputCaptureExtension 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 Maven Setup Additional matchers MDC content Exceptions Markers Key-Value Logger name Amount of repetitions Examples Unit Test Example: Integration Test Example: Example with additional MDC matcher More Examples Alternative: Using @RegisterExtension Usage outside of JUnit 5 (Cucumber example) Cucumber example Cucumber feature file Changes 4.2.0 4.1.1 4.1.0 4.0.1 4.0.0 3.6.2 3.6.1 3.6.0 3.5.0 3.4.1 3.4.0 3.3.0 3.2.1 3.2.0 3.1.0 3.0.0 2.0.1 Updating from Version 1.x.x to 2.x.x Updating from Version 3.2.x or lower to Version 3.3.x or higher Usage Maven Add log-capture as a test dependency to your project. If you use Maven, add this to your pom.xml: Setup Add @ExtendWith(LogCaptureExtension.class) to your test class and use the static logCapture() method to access the captured logs: By default, this captures logs from the test class's package (and sub-packages). To capture logs from specific packages, annotate the test class with @LogCapturePackages : Addi","default_branch":null,"files":null,"tree":[],"storefront":"/r/dm-drogeriemarkt","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dm-drogeriemarkt/log-capture/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}