Java native logging a-la-printf with slf4j

Just saw that the new java logging framework slf4j supports parametrized logs, like“log this {} {} {} and {}”, 1,2,”three”,4);

More on

import org.junit.Test;
import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LoggingTest {

@Rule public TestName name = new TestName();

final Logger logger =

public void testA() {"{} being run...", name.getMethodName());

public void testB() {"{} being run...", name.getMethodName()); }

Lascia un commento