-
간단한 log4j 로그 설정 in Test Code카테고리 없음 2021. 11. 3. 15:46
public class TestLog4j { // cat는 이름이 "TestLog4j"인 카테고리 인스턴스를 가리키기 된다. static Category cat = Category.getInstance(TestLog4j.class.getName()); public static void main(String[] args) { // 콘솔에 로깅하는 간단한 Configuration을 설정 BasicConfigurator.configure(); cat.info("Entering application."); Bar bar = new Bar(); bar.doIt(); cat.info("Exiting application."); } }
[참고]