标签:
import org.apache.log4j.Logger; public class InnerClassLogger { static Logger loggerA = Logger.getLogger(InnerClassLogger.class); public static void main(String[] args) { loggerA.info(new Object(){ @Override public String toString(){ loggerA.info("loggerB"); return ""; } }); } }
输出:
0 [main] INFO InnerClassLogger - loggerB
0 [main] INFO InnerClassLogger - loggerB
标签:
原文地址:http://www.cnblogs.com/softidea/p/4242489.html