Skip to content

Commit

Permalink
[KYUUBI #5528] Remove duplicate properties tag and respect KYUUBI_LOG…
Browse files Browse the repository at this point in the history
…_DIR

### _Why are the changes needed?_

Remove duplicate attribute tags to fix `k8sAuditLogPath` property not found.

![image](https://github.com/apache/kyuubi/assets/17894939/824cd211-db59-4d84-8b33-cd5619716b2f)

and set logDir to KYUUBI_LOG_DIR.

![image](https://github.com/apache/kyuubi/assets/17894939/0c435589-152b-4dca-8ce0-cc967ce9e3e6)

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_

Closes #5528 from wForget/hotfix.

Closes #5528

060e396 [wforget] Respect KYUUBI_LOG_DIR
a1a808b [wforget] Remove duplicate properties tag

Authored-by: wforget <643348094@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit fbf3954)
Signed-off-by: Cheng Pan <chengpan@apache.org>
  • Loading branch information
wForget authored and pan3793 committed Oct 26, 2023
1 parent a4b52ad commit d9c8a8e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions conf/log4j2.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
Set to debug or trace if log4j initialization is failing. -->
<Configuration status="INFO">
<Properties>
<Property name="logDir">${env:KYUUBI_LOG_DIR}</Property>
<Property name="restAuditLogPath">rest-audit.log</Property>
<Property name="restAuditLogFilePattern">rest-audit-%d{yyyy-MM-dd}-%i.log</Property>
</Properties>
<Properties>
<Property name="k8sAuditLogPath">k8s-audit.log</Property>
<Property name="k8sAuditLogFilePattern">k8s-audit-%d{yyyy-MM-dd}-%i.log</Property>
</Properties>
Expand All @@ -35,15 +34,15 @@
<RegexFilter regex=".*Thrift error occurred during processing of message.*" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
</Console>
<RollingFile name="restAudit" fileName="${sys:restAuditLogPath}"
<RollingFile name="restAudit" fileName="${sys:logDir}/${sys:restAuditLogPath}"
filePattern="${sys:restAuditLogFilePattern}">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %c{1}: %m%n%ex"/>
<Policies>
<SizeBasedTriggeringPolicy size="51200KB" />
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<RollingFile name="k8sAudit" fileName="${sys:k8sAuditLogPath}"
<RollingFile name="k8sAudit" fileName="${sys:logDir}/${sys:k8sAuditLogPath}"
filePattern="${sys:k8sAuditLogFilePattern}">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %c{1}: %m%n%ex"/>
<Policies>
Expand Down

0 comments on commit d9c8a8e

Please sign in to comment.