public class Log4jExample{
static Logger log = Logger.getLogger(
log4jExample.class.getName());
public static void main(String[] args) throws IOException,SQLException{
log.debug("Hello this is an debug message");
log.info("Hello this is an info message");
}
}
1条答案
按热度按时间pw136qt21#
为什么不呢´你不能定义一个记录器并通过记录器打印输出吗?