This is an automated email from the ASF dual-hosted git repository.

wangzhen pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.8 by this push:
     new 3003d72b1 [KYUUBI #6268] Specify logDir for RollingFile filePattern
3003d72b1 is described below

commit 3003d72b134a20aeb4f5e6604011ddec4d1a0831
Author: wforget <[email protected]>
AuthorDate: Tue Apr 9 17:27:56 2024 +0800

    [KYUUBI #6268] Specify logDir for RollingFile filePattern
    
    # :mag: 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 :bookmark:
    
    - [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 :coffin:
    
    #### Behavior With This Pull Request :tada:
    
    #### 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 #6268 from wForget/hotfix2.
    
    Closes #6268
    
    b599583be [wforget] Specify logDir for RollingFile filePattern
    
    Authored-by: wforget <[email protected]>
    Signed-off-by: wforget <[email protected]>
    (cherry picked from commit a26156b8f4835028faefe469fa7f3be8f1d6c42a)
    Signed-off-by: wforget <[email protected]>
---
 conf/log4j2.xml.template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/log4j2.xml.template b/conf/log4j2.xml.template
index 215fddf47..96f7051fb 100644
--- a/conf/log4j2.xml.template
+++ b/conf/log4j2.xml.template
@@ -35,7 +35,7 @@
             </Filters>
         </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" />
@@ -43,7 +43,7 @@
             <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" />

Reply via email to