Skip to content

Commit

Permalink
[KYUUBI apache#6268] Specify logDir for RollingFile filePattern
Browse files Browse the repository at this point in the history
# 🔍 Description
## Issue References 🔗

This pull request fixes #

## Describe Your Solution 🔧

We should specify `sys:logDir` for RollingFile filePattern, otherwise the log will be rolled to kyuubi work directory.

## Types of changes 🔖

- [X] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# Checklist 📝

- [X] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes apache#6268 from wForget/hotfix2.

Closes apache#6268

b599583 [wforget] Specify logDir for RollingFile filePattern

Authored-by: wforget <[email protected]>
Signed-off-by: wforget <[email protected]>
  • Loading branch information
wForget committed Apr 9, 2024
1 parent 42c619a commit a26156b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions conf/log4j2.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %tn %c: %m%n%ex"/>
</Console>
<RollingFile name="restAudit" fileName="${sys:logDir}/${sys:restAuditLogPath}"
filePattern="${sys:restAuditLogFilePattern}">
filePattern="${sys:logDir}/${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:logDir}/${sys:k8sAuditLogPath}"
filePattern="${sys:k8sAuditLogFilePattern}">
filePattern="${sys:logDir}/${sys:k8sAuditLogFilePattern}">
<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="opAudit" fileName="${sys:logDir}/${sys:opAuditLogPath}"
filePattern="${sys:opAuditLogFilePattern}">
filePattern="${sys:logDir}/${sys:opAuditLogFilePattern}">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %p %c{1}: %m%n%ex"/>
<Policies>
<SizeBasedTriggeringPolicy size="51200KB" />
Expand Down

0 comments on commit a26156b

Please sign in to comment.