Skip to content

Commit

Permalink
RANGER-4672: updated tagsync log configuration to include hostname an…
Browse files Browse the repository at this point in the history
…d username in log file name

Signed-off-by: Madhan Neethiraj <[email protected]>
  • Loading branch information
himanshumaurya09876 authored and mneethiraj committed Mar 13, 2024
1 parent c6842bc commit 59f840b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tagsync/conf.dist/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion tagsync/scripts/ranger-tagsync-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59f840b

Please sign in to comment.