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

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


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

commit 17c7e3e046dd0c40a4aa2b594452640dd56eb9d2
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 c2db4c475..7eecdd643 100644
--- a/conf/log4j2.xml.template
+++ b/conf/log4j2.xml.template
@@ -32,7 +32,7 @@
             <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" />
@@ -40,7 +40,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