-
Notifications
You must be signed in to change notification settings - Fork 980
[BUILD] Migrate from log4j1 to log4j2 #1769
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
29 commits
Select commit
Hold shift + click to select a range
c63e000
add log4j2.properties
turboFei dded129
more
turboFei 2ec02b4
fix LogDivertAppender
turboFei e20b750
address comments
turboFei dea964a
fix build erorr at first
turboFei a74b6d3
start appender
turboFei 56f4f1f
fix logging
turboFei 7f27f51
more
turboFei 5362b43
make it run at first
turboFei 9129a64
refactor
turboFei 33a38e2
exclude log4j12 from spark-sql
turboFei c13ec29
save temporarily
turboFei 8cc15ae
reformat
turboFei 27b08b6
remove more
turboFei c4a86d4
use AbstractFilter
turboFei 1ea5ca5
add log4j to engine
turboFei 7ce8411
modify log level
turboFei 4f0b22f
save
turboFei 3880300
add log4j2.properties.template
turboFei e24391e
revert log count
turboFei b9e17e1
refactor
turboFei 01d1a84
for log4j1
turboFei 85316a0
Keep compatible with log4j12
turboFei 051f49f
address comments
turboFei 7e3a498
address commments
turboFei 8a91208
remove dependencies from spark-sql-engine
turboFei 762e2d0
only remove org.apache.logging.log4j:log4j-slf4j-impl
turboFei b2fe6db
Use String to present default log level
turboFei 8613779
remove log4j dependencies from spark-sql-engine
turboFei 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # | ||
| # 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 = info | ||
| rootLogger.appenderRef.stdout.ref = STDOUT | ||
|
|
||
| # Console Appender | ||
| appender.console.type = Console | ||
| appender.console.name = STDOUT | ||
| appender.console.target = SYSTEM_OUT | ||
| appender.console.layout.type = PatternLayout | ||
| appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c: %m%n | ||
|
|
||
| appender.console.filter.1.type = Filters | ||
|
|
||
| appender.console.filter.1.a.type = ThresholdFilter | ||
| appender.console.filter.1.a.level = info | ||
|
|
||
| # SPARK-34128: Suppress undesirable TTransportException warnings, due to THRIFT-4805 | ||
| appender.console.filter.1.b.type = RegexFilter | ||
| appender.console.filter.1.b.regex = .*Thrift error occurred during processing of message.* | ||
| appender.console.filter.1.b.onMatch = deny | ||
| appender.console.filter.1.b.onMismatch = neutral | ||
|
|
||
| # Set the default kyuubi-ctl log level to WARN. When running the kyuubi-ctl, the | ||
| # log level for this class is used to overwrite the root logger's log level. | ||
| logger.ctl.name = org.apache.kyuubi.ctl.ServiceControlCli | ||
| logger.ctl.level = error | ||
|
|
||
| # Analysis MySQLFrontend protocol traffic | ||
| # logger.mysql.name = org.apache.kyuubi.server.mysql.codec | ||
| # logger.mysql.level = trace | ||
|
|
||
| # Kyuubi BeeLine | ||
| logger.beeline.name = org.apache.hive.beeline.KyuubiBeeLine | ||
| logger.beeline.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
57 changes: 57 additions & 0 deletions
57
dev/kyuubi-extension-spark-3-1/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,57 @@ | ||
| # | ||
| # 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 = info | ||
| rootLogger.appenderRef.stdout.ref = STDOUT | ||
| rootLogger.appenderRef.file.ref = File | ||
|
|
||
| # Console Appender | ||
| appender.console.type = Console | ||
| appender.console.name = STDOUT | ||
| appender.console.target = SYSTEM_OUT | ||
| appender.console.layout.type = PatternLayout | ||
| appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c: %m%n | ||
|
|
||
| appender.console.filter.1.type = Filters | ||
|
|
||
| appender.console.filter.1.a.type = ThresholdFilter | ||
| appender.console.filter.1.a.level = debug | ||
|
|
||
| # SPARK-34128: Suppress undesirable TTransportException warnings, due to THRIFT-4805 | ||
| appender.console.filter.1.b.type = RegexFilter | ||
| appender.console.filter.1.b.regex = .*Thrift error occurred during processing of message.* | ||
| appender.console.filter.1.b.onMatch = deny | ||
| appender.console.filter.1.b.onMismatch = neutral | ||
|
|
||
| # File Appender | ||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n | ||
|
|
||
| appender.file.filter.1.type = Filters | ||
|
|
||
| appender.file.filter.1.a.type = RegexFilter | ||
| appender.file.filter.1.a.regx = .*Thrift error occurred during processing of message.* | ||
| appender.file.filter.1.a.onMatch = deny | ||
| appender.file.filter.1.a.onMismatch = neutral | ||
|
|
||
| # Set the logger level of File Appender to DEBUG | ||
| appender.file.filter.1.b.type = ThresholdFilter | ||
| appender.file.filter.1.b.level = debug |
57 changes: 57 additions & 0 deletions
57
dev/kyuubi-extension-spark-3-2/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,57 @@ | ||
| # | ||
| # 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 = info | ||
| rootLogger.appenderRef.stdout.ref = STDOUT | ||
| rootLogger.appenderRef.file.ref = File | ||
|
|
||
| # Console Appender | ||
| appender.console.type = Console | ||
| appender.console.name = STDOUT | ||
| appender.console.target = SYSTEM_OUT | ||
| appender.console.layout.type = PatternLayout | ||
| appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c: %m%n | ||
|
|
||
| appender.console.filter.1.type = Filters | ||
|
|
||
| appender.console.filter.1.a.type = ThresholdFilter | ||
| appender.console.filter.1.a.level = debug | ||
|
|
||
| # SPARK-34128: Suppress undesirable TTransportException warnings, due to THRIFT-4805 | ||
| appender.console.filter.1.b.type = RegexFilter | ||
| appender.console.filter.1.b.regex = .*Thrift error occurred during processing of message.* | ||
| appender.console.filter.1.b.onMatch = deny | ||
| appender.console.filter.1.b.onMismatch = neutral | ||
|
|
||
| # File Appender | ||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n | ||
|
|
||
| appender.file.filter.1.type = Filters | ||
|
|
||
| appender.file.filter.1.a.type = RegexFilter | ||
| appender.file.filter.1.a.regx = .*Thrift error occurred during processing of message.* | ||
| appender.file.filter.1.a.onMatch = deny | ||
| appender.file.filter.1.a.onMismatch = neutral | ||
|
|
||
| # Set the logger level of File Appender to DEBUG | ||
| appender.file.filter.1.b.type = ThresholdFilter | ||
| appender.file.filter.1.b.level = debug |
57 changes: 57 additions & 0 deletions
57
dev/kyuubi-extension-spark-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,57 @@ | ||
| # | ||
| # 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 = info | ||
| rootLogger.appenderRef.stdout.ref = STDOUT | ||
| rootLogger.appenderRef.file.ref = File | ||
|
|
||
| # Console Appender | ||
| appender.console.type = Console | ||
| appender.console.name = STDOUT | ||
| appender.console.target = SYSTEM_OUT | ||
| appender.console.layout.type = PatternLayout | ||
| appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c: %m%n | ||
|
|
||
| appender.console.filter.1.type = Filters | ||
|
|
||
| appender.console.filter.1.a.type = ThresholdFilter | ||
| appender.console.filter.1.a.level = debug | ||
|
|
||
| # SPARK-34128: Suppress undesirable TTransportException warnings, due to THRIFT-4805 | ||
| appender.console.filter.1.b.type = RegexFilter | ||
| appender.console.filter.1.b.regex = .*Thrift error occurred during processing of message.* | ||
| appender.console.filter.1.b.onMatch = deny | ||
| appender.console.filter.1.b.onMismatch = neutral | ||
|
|
||
| # File Appender | ||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n | ||
|
|
||
| appender.file.filter.1.type = Filters | ||
|
|
||
| appender.file.filter.1.a.type = RegexFilter | ||
| appender.file.filter.1.a.regx = .*Thrift error occurred during processing of message.* | ||
| appender.file.filter.1.a.onMatch = deny | ||
| appender.file.filter.1.a.onMismatch = neutral | ||
|
|
||
| # Set the logger level of File Appender to DEBUG | ||
| appender.file.filter.1.b.type = ThresholdFilter | ||
| appender.file.filter.1.b.level = debug |
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
57 changes: 57 additions & 0 deletions
57
externals/kyuubi-flink-sql-engine/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,57 @@ | ||
| # | ||
| # 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.stdout.ref = STDOUT | ||
| rootLogger.appenderRef.file.ref = File | ||
|
|
||
| # Console Appender | ||
| appender.console.type = Console | ||
| appender.console.name = STDOUT | ||
| appender.console.target = SYSTEM_OUT | ||
| appender.console.layout.type = PatternLayout | ||
| appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c: %m%n | ||
|
|
||
| appender.console.filter.1.type = Filters | ||
|
|
||
| appender.console.filter.1.a.type = ThresholdFilter | ||
| appender.console.filter.1.a.level = debug | ||
|
|
||
| # SPARK-34128: Suppress undesirable TTransportException warnings, due to THRIFT-4805 | ||
| appender.console.filter.1.b.type = RegexFilter | ||
| appender.console.filter.1.b.regex = .*Thrift error occurred during processing of message.* | ||
| appender.console.filter.1.b.onMatch = deny | ||
| appender.console.filter.1.b.onMismatch = neutral | ||
|
|
||
| # File Appender | ||
| appender.file.type = File | ||
| appender.file.name = File | ||
| appender.file.fileName = target/unit-tests.log | ||
| appender.file.layout.type = PatternLayout | ||
| appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n | ||
|
|
||
| appender.file.filter.1.type = Filters | ||
|
|
||
| appender.file.filter.1.a.type = RegexFilter | ||
| appender.file.filter.1.a.regx = .*Thrift error occurred during processing of message.* | ||
| appender.file.filter.1.a.onMatch = deny | ||
| appender.file.filter.1.a.onMismatch = neutral | ||
|
|
||
| # Set the logger level of File Appender to DEBUG | ||
| appender.file.filter.1.b.type = ThresholdFilter | ||
| appender.file.filter.1.b.level = debug |
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.
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.
We should remove
log4j-1.2from the runtime jarThere 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.
sorry, what it is the runtime jar?
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.
I mean the jars under the
$KYUUBI_HOME/jarsThere 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.
I think
log4j-1.2.17.jarshould not existed after your change, but why it still here?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.
I checked that
log4j-1.2.17.jaris not existing in$KYUUBI_HOME/jars.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.
I do not know why the org.slf4j:slf4j-log4j12:jar:1.7.30 is transferred.