diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-10-03 17:44:52 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-10-03 17:44:52 +0530 |
commit | f2b21b10732d743a5a0940d6565aa18b643f6604 (patch) | |
tree | 74047c98d73f9ee4d69222fa09645dc8ec0e0178 | |
parent | c51d7e1fd1c4500cae7a692ff68b37001db78fdd (diff) |
Set log file under ONAP_CLI_HOME/logs
CLI-2
Change-Id: I65585cb69fe7ba71b57bf338cdc87b926a9bac51
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r-- | deployment/zip/pom.xml | 6 | ||||
-rwxr-xr-x | deployment/zip/src/main/release/bin/onap.sh | 4 | ||||
-rw-r--r-- | framework/src/main/resources/log4j.properties | 11 |
3 files changed, 17 insertions, 4 deletions
diff --git a/deployment/zip/pom.xml b/deployment/zip/pom.xml index eb214e42..f6f9d1b8 100644 --- a/deployment/zip/pom.xml +++ b/deployment/zip/pom.xml @@ -90,6 +90,12 @@ } ant.copy(todir: + "${deployUnzip}/conf") { + fileset(file: + "${project.build.directory}/../../../framework/src/main/resources/log4j.properties") + } + + ant.copy(todir: "${deployUnzip}/docs") { fileset(file: "${project.build.directory}/../../../README.md") diff --git a/deployment/zip/src/main/release/bin/onap.sh b/deployment/zip/src/main/release/bin/onap.sh index 4009a265..c7d4142a 100755 --- a/deployment/zip/src/main/release/bin/onap.sh +++ b/deployment/zip/src/main/release/bin/onap.sh @@ -30,7 +30,7 @@ done if [ "$ONAP_CLI_DEBUG" = "true" ] then - java -Xdebug -Xrunjdwp:transport=dt_socket,address=${ONAP_CLI_DEBUG_PORT:-5005},server=y -classpath $CLASSPATH org.onap.cli.main.OnapCli "$@" + java -Xdebug -Xrunjdwp:transport=dt_socket,address=${ONAP_CLI_DEBUG_PORT:-5005},server=y -classpath $CLASSPATH -DONAP_CLI_HOME=$ONAP_CLI_HOME org.onap.cli.main.OnapCli "$@" else - java -classpath $CLASSPATH org.onap.cli.main.OnapCli "$@" + java -classpath $CLASSPATH -DONAP_CLI_HOME=$ONAP_CLI_HOME org.onap.cli.main.OnapCli "$@" fi diff --git a/framework/src/main/resources/log4j.properties b/framework/src/main/resources/log4j.properties index b7fe5437..fdb74039 100644 --- a/framework/src/main/resources/log4j.properties +++ b/framework/src/main/resources/log4j.properties @@ -1,2 +1,9 @@ -log4j.rootLogger=off, FileNetNullAppender -log4j.appender.FileNetNullAppender=org.apache.log4j.varia.NullAppender
\ No newline at end of file +log4j.rootLogger=DEBUG, file + +# Redirect log messages to a log file, support file rolling. +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=${ONAP_CLI_HOME}/logs/oclip.log +log4j.appender.file.MaxFileSize=5MB +log4j.appender.file.MaxBackupIndex=10 +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
\ No newline at end of file |