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

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit 59f840ba6aa56856100d16ddaf56f55e99c1497d
Author: himanshumaurya09876 <[email protected]>
AuthorDate: Wed Jan 24 13:24:40 2024 +0530

    RANGER-4672: updated tagsync log configuration to include hostname and 
username in log file name
    
    Signed-off-by: Madhan Neethiraj <[email protected]>
---
 tagsync/conf.dist/logback.xml              | 4 ++--
 tagsync/scripts/ranger-tagsync-services.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tagsync/conf.dist/logback.xml b/tagsync/conf.dist/logback.xml
index c1a94fee4..71cc4a5e0 100644
--- a/tagsync/conf.dist/logback.xml
+++ b/tagsync/conf.dist/logback.xml
@@ -21,12 +21,12 @@
     <!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender-->
     <!--and 
http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy-->
     <!--for further documentation-->
-    <file>${logdir}/tagsync.log</file>
+    <file>${logdir}/tagsync-${hostname}-${user}.log</file>
     <encoder>
       <pattern>%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] - %L %m%n</pattern>
     </encoder>
     <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-      <fileNamePattern>${logdir}/tagsync.log.%d{yyyy-MM-dd}</fileNamePattern>
+      
<fileNamePattern>${logdir}/tagsync-${hostname}-${user}.log.%d{yyyy-MM-dd}</fileNamePattern>
       <maxHistory>15</maxHistory>
       <cleanHistoryOnStart>true</cleanHistoryOnStart>
     </rollingPolicy>
diff --git a/tagsync/scripts/ranger-tagsync-services.sh 
b/tagsync/scripts/ranger-tagsync-services.sh
index 460c4a130..ab23ab9b2 100755
--- a/tagsync/scripts/ranger-tagsync-services.sh
+++ b/tagsync/scripts/ranger-tagsync-services.sh
@@ -97,7 +97,7 @@ if [ "${action}" == "START" ]; then
        fi
 
        SLEEP_TIME_AFTER_START=5
-       nohup java -Dproc_rangertagsync ${JAVA_OPTS} 
-Dlogdir="${RANGER_TAGSYNC_LOG_DIR}" 
-Dlogback.configurationFile=file:${TAGSYNC_CONF_DIR}/logback.xml -cp "${cp}" 
org.apache.ranger.tagsync.process.TagSynchronizer  > 
${RANGER_TAGSYNC_LOG_DIR}/tagsync.out 2>&1 &
+       nohup java -Dproc_rangertagsync ${JAVA_OPTS} 
-Dlogdir="${RANGER_TAGSYNC_LOG_DIR}" 
-Dlogback.configurationFile=file:${TAGSYNC_CONF_DIR}/logback.xml -Duser=${USER} 
-Dhostname=${HOSTNAME} -cp "${cp}" 
org.apache.ranger.tagsync.process.TagSynchronizer  > 
${RANGER_TAGSYNC_LOG_DIR}/tagsync.out 2>&1 &
        VALUE_OF_PID=$!
        echo "Starting Apache Ranger Tagsync Service"
        sleep $SLEEP_TIME_AFTER_START

Reply via email to