spark-sql 控制台修改日志级别

spark-sql 控制台修改日志级别这个我找了好久的解决方法

修改文件 conf/log4j.properties

# Set everything to be logged to the console
log4j.rootCategory=WARN, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.target=System.err
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n


# Settings to quiet third party logs that are too verbose
log4j.logger.org.eclipse.jetty=WARN
log4j.logger.org.eclipse.jetty.util.component.AbstractLifeCycle=ERROR
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN


在bin/spark-sql 目录下

spark-sql --driver-java-options "-Dlog4j.debug -Dlog4jion=file:///opt/spark-2/conf/log4j.properties"

截图 不在有log日志

spark-sql 控制台修改日志级别_第1张图片

你可能感兴趣的:(spark,大数据)