https://github.com/ghusta/jul-to-slf4j-junit4
JUnit 4.x Helpers for jul-to-slf4j bridge.
https://github.com/ghusta/jul-to-slf4j-junit4
java junit4 junit4-rules logging slf4j
Last synced: 3 months ago
JSON representation
JUnit 4.x Helpers for jul-to-slf4j bridge.
- Host: GitHub
- URL: https://github.com/ghusta/jul-to-slf4j-junit4
- Owner: ghusta
- Created: 2019-01-08T10:45:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-08T10:49:15.000Z (over 6 years ago)
- Last Synced: 2025-01-06T22:36:00.543Z (5 months ago)
- Topics: java, junit4, junit4-rules, logging, slf4j
- Language: Java
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= JUnit 4.x Helpers for jul-to-slf4j bridge
:icons: font
:toc:image:https://travis-ci.org/ghusta/jul-to-slf4j-junit4.svg?branch=master["Build Status", link="https://travis-ci.org/ghusta/jul-to-slf4j-junit4"]
== Overview
JUnit 4.x integration for _jul-to-slf4j_ bridge.
See more details on https://www.slf4j.org/legacy.html#jul-to-slf4j[jul-to-slf4j bridge].== Features
* Adds a JUnit 4 https://junit.org/junit4/javadoc/4.12/org/junit/rules/TestRule.html[TestRule] with @ClassRule for initializing https://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html[SLF4JBridgeHandler].
== Usage
Use in a test class as :
[source,java]
----
@ClassRule
public static SLF4JBridgeHandlerInitializer slf4JBridgeHandlerInitializer = new SLF4JBridgeHandlerInitializer();
----or using a singleton :
[source,java]
----
@ClassRule
public static SLF4JBridgeHandlerInitializer slf4JBridgeHandlerInitializer = SLF4JBridgeHandlerInitializer.INSTANCE;
----