Skip to content

Commit d93826b

Browse files
branch-4.0: [fix](jni) Fix jni.log not printing #58457 (#58487)
Cherry-picked from #58457 Co-authored-by: zy-kkk <[email protected]>
1 parent 3feea90 commit d93826b

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

fe/be-java-extensions/java-common/src/main/resources/log4j.properties renamed to fe/be-java-extensions/java-common/src/main/resources/log4j2.properties

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,32 @@
55
# to you under the Apache License, Version 2.0 (the
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
8-
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
10+
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
log4j.rootLogger=INFO, RollingFile
19-
log4j.appender.RollingFile=org.apache.log4j.RollingFileAppender
20-
log4j.appender.RollingFile.Threshold=INFO
21-
log4j.appender.RollingFile.File=${logPath}
22-
log4j.appender.RollingFile.Append=true
23-
log4j.appender.RollingFile.MaxFileSize=10MB
24-
log4j.appender.RollingFile.MaxBackupIndex=5
25-
log4j.appender.RollingFile.layout=org.apache.log4j.PatternLayout
26-
log4j.appender.RollingFile.layout.ConversionPattern= %d{yyyy-MM-dd HH:mm:ss} %5p %t %-5l - %m%n
18+
status = error
19+
name = JniLog4j2Config
20+
21+
# RollingFile appender
22+
appender.rolling.type = RollingFile
23+
appender.rolling.name = RollingFile
24+
appender.rolling.fileName = ${sys:logPath}
25+
appender.rolling.filePattern = ${sys:logPath}.%i
26+
appender.rolling.layout.type = PatternLayout
27+
appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %5p %t %-5l - %m%n
28+
appender.rolling.policies.type = Policies
29+
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
30+
appender.rolling.policies.size.size = 10MB
31+
appender.rolling.strategy.type = DefaultRolloverStrategy
32+
appender.rolling.strategy.max = 5
33+
34+
# Root logger
35+
rootLogger.level = info
36+
rootLogger.appenderRef.rolling.ref = RollingFile

0 commit comments

Comments
 (0)