log多了让人烦
getLogger
里面的参数可以自定义,以便确定过滤范围
log的级别有下面几种
Level.DEBUG, Level.INFO, Level.WARN, Level.ERROR, Level.FATAL
import org.apache.log4j.{Level, Logger}
Logger.getLogger("org.apache.spark").setLevel(Level.ERROR)
Logger.getLogger("org.spark_project.jetty.server").setLevel(Level.ERROR)
Logger.getLogger("org.apache.hadoop.hive.metastore").setLevel(Level.ERROR)