Skip to content

Commit

Permalink
Configure log4j version 2.x for test cases (#5822)
Browse files Browse the repository at this point in the history
Signed-off-by: Chong Gao <res_life@163.com>
  • Loading branch information
res-life authored Jun 15, 2022
1 parent f59a12b commit ed7de6e
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 0 deletions.
42 changes: 42 additions & 0 deletions integration_tests/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2022, NVIDIA CORPORATION.
#
# Licensed 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.
#

# log level of log4j itself
status=warn

# rolling appender
appender.rolling.type=File
appender.rolling.name=fileAppender
appender.rolling.filter.threshold.type=ThresholdFilter
appender.rolling.filter.threshold.level=info
appender.rolling.layout.type=PatternLayout
appender.rolling.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
appender.rolling.append=true
appender.rolling.fileName=target/surefire-reports/scala-test-detailed-output.log

# console appender
appender.console.type=Console
appender.console.name=consoleAppender
appender.console.filter.threshold.type=ThresholdFilter
# print error log and system.err to console
appender.console.filter.threshold.level=error
appender.console.target=SYSTEM_ERR
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n

rootLogger.level=info
rootLogger.appenderRef.rolling.ref=fileAppender
rootLogger.appenderRef.console.ref=consoleAppender
42 changes: 42 additions & 0 deletions sql-plugin/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2022, NVIDIA CORPORATION.
#
# Licensed 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.
#

# log level of log4j itself
status=warn

# rolling appender
appender.rolling.type=File
appender.rolling.name=fileAppender
appender.rolling.filter.threshold.type=ThresholdFilter
appender.rolling.filter.threshold.level=info
appender.rolling.layout.type=PatternLayout
appender.rolling.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
appender.rolling.append=true
appender.rolling.fileName=target/surefire-reports/scala-test-detailed-output.log

# console appender
appender.console.type=Console
appender.console.name=consoleAppender
appender.console.filter.threshold.type=ThresholdFilter
# print error log and system.err to console
appender.console.filter.threshold.level=error
appender.console.target=SYSTEM_ERR
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n

rootLogger.level=info
rootLogger.appenderRef.rolling.ref=fileAppender
rootLogger.appenderRef.console.ref=consoleAppender
42 changes: 42 additions & 0 deletions tests/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2022, NVIDIA CORPORATION.
#
# Licensed 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.
#

# log level of log4j itself
status=warn

# rolling appender
appender.rolling.type=File
appender.rolling.name=fileAppender
appender.rolling.filter.threshold.type=ThresholdFilter
appender.rolling.filter.threshold.level=info
appender.rolling.layout.type=PatternLayout
appender.rolling.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
appender.rolling.append=true
appender.rolling.fileName=target/surefire-reports/scala-test-detailed-output.log

# console appender
appender.console.type=Console
appender.console.name=consoleAppender
appender.console.filter.threshold.type=ThresholdFilter
# print error log and system.err to console
appender.console.filter.threshold.level=error
appender.console.target=SYSTEM_ERR
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n

rootLogger.level=info
rootLogger.appenderRef.rolling.ref=fileAppender
rootLogger.appenderRef.console.ref=consoleAppender
42 changes: 42 additions & 0 deletions tools/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2022, NVIDIA CORPORATION.
#
# Licensed 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.
#

# log level of log4j itself
status=warn

# rolling appender
appender.rolling.type=File
appender.rolling.name=fileAppender
appender.rolling.filter.threshold.type=ThresholdFilter
appender.rolling.filter.threshold.level=info
appender.rolling.layout.type=PatternLayout
appender.rolling.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
appender.rolling.append=true
appender.rolling.fileName=target/surefire-reports/scala-test-detailed-output.log

# console appender
appender.console.type=Console
appender.console.name=consoleAppender
appender.console.filter.threshold.type=ThresholdFilter
# print error log and system.err to console
appender.console.filter.threshold.level=error
appender.console.target=SYSTEM_ERR
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n

rootLogger.level=info
rootLogger.appenderRef.rolling.ref=fileAppender
rootLogger.appenderRef.console.ref=consoleAppender
42 changes: 42 additions & 0 deletions udf-compiler/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2022, NVIDIA CORPORATION.
#
# Licensed 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.
#

# log level of log4j itself
status=warn

# rolling appender
appender.rolling.type=File
appender.rolling.name=fileAppender
appender.rolling.filter.threshold.type=ThresholdFilter
appender.rolling.filter.threshold.level=info
appender.rolling.layout.type=PatternLayout
appender.rolling.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
appender.rolling.append=true
appender.rolling.fileName=target/surefire-reports/scala-test-detailed-output.log

# console appender
appender.console.type=Console
appender.console.name=consoleAppender
appender.console.filter.threshold.type=ThresholdFilter
# print error log and system.err to console
appender.console.filter.threshold.level=error
appender.console.target=SYSTEM_ERR
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n

rootLogger.level=info
rootLogger.appenderRef.rolling.ref=fileAppender
rootLogger.appenderRef.console.ref=consoleAppender

0 comments on commit ed7de6e

Please sign in to comment.