Repository: lens Updated Branches: refs/heads/master b94fc5be3 -> f8a387917
LENS-1409 : Remove Unknown.log file before lens startup Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/f8a38791 Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/f8a38791 Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/f8a38791 Branch: refs/heads/master Commit: f8a3879172c923d5ceac76c3d853b77eea002ca9 Parents: b94fc5b Author: Lavkesh Lahngir <lavk...@linux.com> Authored: Tue Apr 18 11:54:31 2017 +0530 Committer: Amareshwari Sriramadasu <amareshw...@apache.org> Committed: Tue Apr 18 11:54:31 2017 +0530 ---------------------------------------------------------------------- tools/conf/server/logback.xml | 2 +- tools/scripts/lens-ctl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lens/blob/f8a38791/tools/conf/server/logback.xml ---------------------------------------------------------------------- diff --git a/tools/conf/server/logback.xml b/tools/conf/server/logback.xml index 5173321..4f98529 100644 --- a/tools/conf/server/logback.xml +++ b/tools/conf/server/logback.xml @@ -100,7 +100,7 @@ <appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender"> <discriminator> <key>queryLogId</key> - <defaultValue>unknown</defaultValue> + <defaultValue>${query.log.default.id}</defaultValue> </discriminator> <sift> <appender name="FILE-${logSegregationId}" class="ch.qos.logback.core.FileAppender"> http://git-wip-us.apache.org/repos/asf/lens/blob/f8a38791/tools/scripts/lens-ctl ---------------------------------------------------------------------- diff --git a/tools/scripts/lens-ctl b/tools/scripts/lens-ctl index 6e1d363..304b4f5 100755 --- a/tools/scripts/lens-ctl +++ b/tools/scripts/lens-ctl @@ -136,7 +136,7 @@ start() { mkdir -p $LENS_LOG_DIR - JAVA_PROPERTIES="${JAVA_PROPERTIES} $LENS_OPTS $LENS_PROPERTIES -Dlens.log.dir=$LENS_LOG_DIR -Dlens.home=${LENS_HOME_DIR} -Dconfig.location=$LENS_CONF" + JAVA_PROPERTIES="${JAVA_PROPERTIES} $LENS_OPTS $LENS_PROPERTIES -Dlens.log.dir=$LENS_LOG_DIR -Dlens.home=${LENS_HOME_DIR} -Dconfig.location=$LENS_CONF -Dquery.log.default.id=unknown" shift while [[ ${1} =~ ^\-D ]]; do @@ -144,6 +144,10 @@ start() { shift done + queryLogIDFile="${LENS_LOG_DIR}/unknown.log" + if [ -f "$queryLogIDFile" ] ; then + rm "$queryLogIDFile" + fi if [ -n "$opt_verbose" ] ; then JAVA_PROPERTIES="-Dlensserver.root.logger=INFO,CONSOLE -Dlensserver.request.logger=INFO,CONSOLE ${JAVA_PROPERTIES}" ${JAVA_BIN} ${JAVA_PROPERTIES} -cp ${LENSCPPATH} org.apache.lens.server.LensServer $*