This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new fbf395408 [KYUUBI #5528] Remove duplicate properties tag and respect
KYUUBI_LOG_DIR
fbf395408 is described below
commit fbf395408f28a062f917d9132da95b516b9d4b98
Author: wforget <[email protected]>
AuthorDate: Thu Oct 26 13:58:57 2023 +0800
[KYUUBI #5528] Remove duplicate properties tag and respect KYUUBI_LOG_DIR
### _Why are the changes needed?_
Remove duplicate attribute tags to fix `k8sAuditLogPath` property not found.

and set logDir to KYUUBI_LOG_DIR.

### _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
060e39698 [wforget] Respect KYUUBI_LOG_DIR
a1a808b0a [wforget] Remove duplicate properties tag
Authored-by: wforget <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
conf/log4j2.xml.template | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/conf/log4j2.xml.template b/conf/log4j2.xml.template
index 2601690eb..215fddf47 100644
--- a/conf/log4j2.xml.template
+++ b/conf/log4j2.xml.template
@@ -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>
@@ -35,7 +34,7 @@
<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>
@@ -43,7 +42,7 @@
</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>