Created
February 28, 2015 14:16
-
-
Save mbonaci/e92a2bc690e002f461c1 to your computer and use it in GitHub Desktop.
log4j.properties: ERRORs to the console, INFO to a file (Spark)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set everything to be logged to the console | |
log4j.rootCategory=INFO, console, file | |
log4j.appender.console=org.apache.log4j.ConsoleAppender | |
log4j.appender.console.target=System.err | |
log4j.appender.console.threshold=ERROR | |
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 | |
log4j.appender.file=org.apache.log4j.RollingFileAppender | |
log4j.appender.file.File=/home/mbo/Spark/logging.log | |
log4j.appender.file.MaxFileSize=5MB | |
log4j.appender.file.MaxBackupIndex=10 | |
log4j.appender.file.layout=org.apache.log4j.PatternLayout | |
log4j.appender.file.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=INFO | |
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for the share!