Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spark log level 日志级别设置 #8

Open
HbnKing opened this issue Feb 1, 2019 · 0 comments
Open

spark log level 日志级别设置 #8

HbnKing opened this issue Feb 1, 2019 · 0 comments

Comments

@HbnKing
Copy link
Owner

HbnKing commented Feb 1, 2019

  1. 代码中设置日志级别
JavaSparkContext context=new JavaSparkContext(conf);
context.setLogLevel("warn");

2 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant