summaryrefslogtreecommitdiffstats
path: root/newton
diff options
context:
space:
mode:
authorHuang Haibin <haibin.huang@intel.com>2018-03-15 22:02:16 +0800
committerHuang Haibin <haibin.huang@intel.com>2018-03-15 22:16:04 +0800
commit1bf84e64ce12d1e34fe5d72d6fc0411aed20cf26 (patch)
tree9493d02de28074ddbddd8c47e3141cefb0107274 /newton
parentdaf87b3a503a6d3ff5e82abf31d5a667d6616b16 (diff)
modify log directory
Change-Id: I119b9018b9f403fb9f6637abe048e99f0f00c0c1 Issue-ID: MULTICLOUD-138 Signed-off-by: Huang Haibin <haibin.huang@intel.com>
Diffstat (limited to 'newton')
-rw-r--r--newton/newton/settings.py3
-rw-r--r--newton/pom.xml70
-rwxr-xr-xnewton/run.sh8
3 files changed, 43 insertions, 38 deletions
diff --git a/newton/newton/settings.py b/newton/newton/settings.py
index 4b08d2a6..aafcfbbc 100644
--- a/newton/newton/settings.py
+++ b/newton/newton/settings.py
@@ -98,7 +98,7 @@ LOGGING = {
'newton_handler': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
- 'filename': os.path.join(BASE_DIR, 'logs/runtime_newton.log'),
+ 'filename': '/var/log/onap/multicloud/openstack/newton/newton.log',
'formatter': 'standard',
'maxBytes': 1024 * 1024 * 50,
'backupCount': 5,
@@ -149,6 +149,7 @@ MULTIVIM_VERSION = "multicloud-" + OPENSTACK_VERSION
if 'test' in sys.argv:
+ LOGGING['handlers']['newton_handler']['filename'] = 'logs/newton.log'
REST_FRAMEWORK = {}
import platform
diff --git a/newton/pom.xml b/newton/pom.xml
index 091b6519..c0401c1a 100644
--- a/newton/pom.xml
+++ b/newton/pom.xml
@@ -61,42 +61,42 @@
</environmentVariables>
</configuration>
</plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
- <executions>
- <execution>
- <id>clean phase script</id>
- <phase>clean</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <arguments>
- <argument>__</argument>
- <argument>clean</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
- <id>test script</id>
- <phase>test</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <arguments>
- <argument>__</argument>
- <argument>test</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <id>clean phase script</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>__</argument>
+ <argument>clean</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>test script</id>
+ <phase>test</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <arguments>
+ <argument>__</argument>
+ <argument>test</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
diff --git a/newton/run.sh b/newton/run.sh
index 0e2bee32..43de581f 100755
--- a/newton/run.sh
+++ b/newton/run.sh
@@ -17,8 +17,12 @@ memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid
export PYTHONPATH=lib/share
nohup python manage.py runserver 0.0.0.0:9003 2>&1 &
-while [ ! -f logs/runtime_newton.log ]; do
+logDir="/var/log/onap/multicloud/openstack/newton"
+if [ ! -x $logDir ]; then
+ mkdir -p $logDir
+fi
+while [ ! -f $logDir/newton.log ]; do
sleep 1
done
-tail -F logs/runtime_newton.log
+tail -F $logDir/newton.log