Skip to content

Commit

Permalink
LoggerTest类中新增@Sl4j的注解
Browse files Browse the repository at this point in the history
  • Loading branch information
longfeizheng committed Nov 5, 2017
1 parent 1bef423 commit d3fa78b
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/test/java/cn/merryyou/logback/LoggerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

Expand All @@ -19,14 +17,19 @@
@SpringBootTest
@Slf4j
public class LoggerTest {
// private final Logger logger = LoggerFactory.getLogger(LoggerTest2.class);
private final Logger logger = LoggerFactory.getLogger(LoggerTest.class);
// private final Logger logger = LoggerFactory.getLogger(LoggerTest2.class);
// private final Logger logger = LoggerFactory.getLogger(LoggerTest.class);

@Test
public void test1(){
logger.debug("debug...");
logger.info("info...");
logger.info("name: {} ,age: {}","tom",20);
logger.error("error");
public void test1() {
// logger.debug("debug...");
// logger.info("info...");
// logger.info("name: {} ,age: {}","tom",20);
// logger.error("error");

log.debug("debug...");
log.info("info...");
log.info("name: {} ,age: {}", "tom", 20);
log.error("error");
}
}

0 comments on commit d3fa78b

Please sign in to comment.