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

Add print logging behind a flag #758

Merged
merged 1 commit into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions spark/src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#Log4j pattern documentation - https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
# Set everything to be logged to the console
log4j.rootCategory=INFO, 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{yyyy-MM-dd HH:mm:ss} [%p] [%c{1}:%L] %m%n

# Settings to quiet third party logs that are too verbose
log4j.logger.org.sparkproject.jetty=ERROR
log4j.logger.org.sparkproject.jetty.util.component.AbstractLifeCycle=ERROR
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN
log4j.logger.org.apache.spark.scheduler=ERROR
log4j.logger.org.apache.spark.storage.memory=ERROR
log4j.logger.org.apache.spark.SecurityManager=ERROR
log4j.logger.org.apache.spark.SparkEnv=WARN
log4j.logger.org.apache.spark.storage=ERROR
log4j.logger.org.apache.spark.sql=WARN
log4j.logger.org.apache.spark.executor=ERROR
log4j.logger.org.apache.parquet.filter2=WARN
log4j.logger.org.apache.spark.SparkContext=WARN
log4j.logger.org.apache.parquet.hadoop=WARN
log4j.logger.org.apache.hadoop.mapreduce=ERROR
log4j.logger.ai.chronon.spark=INFO
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ object SparkSessionBuilder {
}
val spark = builder.getOrCreate()
// disable log spam
// spark.sparkContext.setLogLevel("ERROR")
spark.sparkContext.setLogLevel("ERROR")

Logger.getLogger("parquet.hadoop").setLevel(java.util.logging.Level.SEVERE)
spark
Expand Down Expand Up @@ -119,7 +119,7 @@ object SparkSessionBuilder {
}
val spark = builder.getOrCreate()
// disable log spam
// spark.sparkContext.setLogLevel("ERROR")
spark.sparkContext.setLogLevel("ERROR")
Logger.getLogger("parquet.hadoop").setLevel(java.util.logging.Level.SEVERE)
spark
}
Expand Down