调用Spark-submit
将导致显示已获取包的默认常春藤日志。虽然与首次启动相关,但通常缓存策略使得使用Cache Hits进行日志记录的效果不高。
禁用日志的最佳方法是什么?
不希望看到类似的内容:
Ivy Default Cache set to: /root/.ivy2/cache
The jars for the packages stored in: /root/.ivy2/jars
:: loading settings :: url = jar:file:/usr/local/spark-2.0.2-bin-hadoop2.4/jars/ivy-2.4.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
com.amazonaws#aws-java-sdk added as a dependency
org.apache.hadoop#hadoop-aws added as a dependency
...
答案 0 :(得分:1)
尝试将此添加到conf/log4j.properties
以禁用从org
开始的任何包中的所有日志记录,其中包括Spark和Ivy:
log4j.logger.org=OFF
我还没试过这个,但我猜这会禁用常春藤记录:
log4j.logger.org.apache.ivy=OFF