如何在IntelliJ IDEA中设置Spark应用程序的日志记录级别? [英] How to set up logging level for Spark application in IntelliJ IDEA?

查看:1006
本文介绍了如何在IntelliJ IDEA中设置Spark应用程序的日志记录级别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用通过SBT创建的IntelliJ中的Scala项目。该项目将Spark作为其依赖项之一。我还处于开发阶段,所以一切都在我的本地机器上运行。

I'm working on a Scala project in IntelliJ that was created through SBT. The project has Spark as one of its dependencies. I'm still in the development phase so everything is running on my local machine.

我如何更改日志级别等Spark配置?

How can I change Spark configurations like logging level, for example?

推荐答案

如果您正在使用IDE进行本地开发,则可以通过以下方式更改运行时的日志级别:

If you are working on the local development with IDE, you can change the log level at run-time by:


LogManager。 getRootLogger.setLevel(Level.ALL)

LogManager.getRootLogger.setLevel(Level.ALL)

Ps:在代码中创建SparkContext / SQLContext后放置该行。

Ps: Put that line after the SparkContext/ SQLContext was created in your code.

这篇关于如何在IntelliJ IDEA中设置Spark应用程序的日志记录级别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆