-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-6305][BUILD] Migrate from log4j1 to log4j2 #34895
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
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
93db02d
Migrate to log4j2 + log4j1 api bridge.
viirya d21cf16
More
viirya 1672ec8
More
viirya e39649b
More
viirya 3204b7d
More
viirya 18ba1c9
More
viirya 80a0cb7
More
viirya 0d7bd5d
Fix style
viirya 5084efe
bump log4j version
viirya 7aafeef
Complete log4j2-defaults.properties.
viirya 2679547
Start appender.
viirya ba4d41e
More
viirya 5e63e9a
Update dependency manifest.
viirya 50ee67c
Remove log4j1 from hadoop2
viirya cc0681f
Style issue.
viirya ee71a22
More
viirya 62f419f
More
viirya 95c3743
More
viirya 7906745
More
viirya c2b3329
Add more log42 properties files.
viirya 98f36fc
Start the appender.
viirya 72f0b29
More
viirya 4409de4
Fix style
viirya 8d43059
Add remaining logj2 properties
viirya 90277a2
Fix OptimizerLoggingSuite
viirya a399e36
Fix ReplSuite
viirya 1424e84
Fix HiveHadoopDelegationTokenManagerSuite on JDK 11.
viirya cdcfafd
Trigger Build
viirya 2aaed30
More
viirya 67e5bae
Merge remote-tracking branch 'upstream/master' into log4j2
viirya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Set everything to be logged to the file target/unit-tests.log | ||
| rootLogger.level = debug | ||
| rootLogger.appenderRef.file.ref = File | ||
|
|
||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.append = true | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n | ||
|
|
||
| # Silence verbose logs from 3rd-party libraries. | ||
| logger.netty.name = io.netty | ||
| logger.netty.level = info |
This file contains hidden or 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
31 changes: 31 additions & 0 deletions
31
common/network-common/src/test/resources/log4j2.properties
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Set everything to be logged to the file target/unit-tests.log | ||
| rootLogger.level = debug | ||
| rootLogger.appenderRef.file.ref = File | ||
|
|
||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.append = true | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n | ||
|
|
||
| # Silence verbose logs from 3rd-party libraries. | ||
| logger.netty.name = io.netty | ||
| logger.netty.level = info |
This file contains hidden or 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
27 changes: 27 additions & 0 deletions
27
common/network-shuffle/src/test/resources/log4j2.properties
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Set everything to be logged to the file target/unit-tests.log | ||
| rootLogger.level = debug | ||
| rootLogger.appenderRef.file.ref = File | ||
|
|
||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.append = true | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n |
This file contains hidden or 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
55 changes: 55 additions & 0 deletions
55
core/src/main/resources/org/apache/spark/log4j2-defaults.properties
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Set everything to be logged to the console | ||
| rootLogger.level = warn | ||
| rootLogger.appenderRef.stdout.ref = STDOUT | ||
|
|
||
| appender.console.type = Console | ||
| appender.console.name = STDOUT | ||
| appender.console.target = SYSTEM_OUT | ||
| appender.console.layout.type = PatternLayout | ||
| appender.console.layout.pattern = %d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n | ||
|
|
||
| # Settings to quiet third party logs that are too verbose | ||
| logger.jetty.name = org.sparkproject.jetty | ||
| logger.jetty.level = warn | ||
| logger.jetty2.name = org.sparkproject.jetty.util.component.AbstractLifeCycle | ||
| logger.jetty2.level = error | ||
| logger.repl1.name = org.apache.spark.repl.SparkIMain$exprTyper | ||
| logger.repl1.level = info | ||
| logger.repl2.name = org.apache.spark.repl.SparkILoop$SparkILoopInterpreter | ||
| logger.repl2.level = info | ||
|
|
||
| # Set the default spark-shell log level to WARN. When running the spark-shell, the | ||
| # log level for this class is used to overwrite the root logger's log level, so that | ||
| # the user can have different defaults for the shell and regular Spark apps. | ||
| logger.repl.name = org.apache.spark.repl.Main | ||
| logger.repl.level = warn | ||
|
|
||
| # SPARK-9183: Settings to avoid annoying messages when looking up nonexistent UDFs | ||
| # in SparkSQL with Hive support | ||
| logger.metastore.name = org.apache.hadoop.hive.metastore.RetryingHMSHandler | ||
| logger.metastore.level = fatal | ||
| logger.hive_functionregistry.name = org.apache.hadoop.hive.ql.exec.FunctionRegistry | ||
| logger.hive_functionregistry.level = error | ||
|
|
||
| # Parquet related logging | ||
| logger.parquet.name = org.apache.parquet.CorruptStatistics | ||
| logger.parquet.level = error | ||
| logger.parquet2.name = parquet.CorruptStatistics | ||
| logger.parquet2.level = error | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random thing I just started noticing, the default logging now goes to stdout instead of stderr, was that intentional? The
log4j2.properties.templateuses stderr too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spark/core/src/main/resources/org/apache/spark/log4j-defaults.properties
Lines 18 to 23 in 78a5825
spark/core/src/main/resources/org/apache/spark/log4j2-defaults.properties
Lines 19 to 26 in 78d492c
look different, WDYT? @viirya
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be when I copied across properties file and missed to change.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roughly scanned, seems only this place changes from stderr to stdout, #37854 try fix this