Eclipse中屏蔽日志

如何在Eclipse中屏蔽日志

//屏蔽日志 Eclipse Java
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
Logger.getLogger("org.apache.spark").setLevel(Level.WARN);
Logger.getLogger("org.eclipse.jetty.server").setLevel(Level.OFF); //Scala
屏蔽日志与在Java中是一样的
import org.apache.log4j.{Level, Logger} 
Logger.getLogger("org.apache.spark").setLevel(Level.WARN)
Logger.getLogger("org.eclipse.jetty.server").setLevel(Level.OFF)
上一篇:The connection to the server localhost:8080 was refused - did you specify the right host or port?


下一篇:RocketMQ服务搭建_1