You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2013/02/15 15:54:34 UTC

git commit: refs/heads/storage_refactor - Make sure initial log messages go somewhere for agent and usage

Updated Branches:
  refs/heads/storage_refactor 390288001 -> 9589f9fe5


Make sure initial log messages go somewhere for agent and usage


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/9589f9fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/9589f9fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/9589f9fe

Branch: refs/heads/storage_refactor
Commit: 9589f9fe5f401df90f7b356c9186d012c8f887ab
Parents: 3902880
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Fri Feb 15 15:48:22 2013 +0100
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Fri Feb 15 15:48:22 2013 +0100

----------------------------------------------------------------------
 packaging/centos63/cloud-agent.rc |    5 +++--
 packaging/centos63/cloud-usage.rc |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9589f9fe/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index acf8131..19782b7 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -31,7 +31,8 @@ whatami=cloudstack-agent
 SHORTNAME="$whatami"
 PIDFILE=/var/run/"$whatami".pid
 LOCKFILE=/var/lock/subsys/"$SHORTNAME"
-LOGFILE=/var/log/cloudstack/agent/agent.log
+LOGDIR=/var/log/cloudstack/agent
+LOGFILE=${LOGFIR}/agent.log
 PROGNAME="Cloud Agent"
 CLASS="com.cloud.agent.AgentShell"
 JSVC=`which jsvc 2>/dev/null`;
@@ -67,7 +68,7 @@ export CLASSPATH="$SCP:$DCP:$ACP:$JCP:/etc/cloudstack/agent:/usr/share/cloudstac
 start() {
         echo -n $"Starting $PROGNAME: "
 	if hostname --fqdn >/dev/null 2>&1 ; then
-		$JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" $CLASS
+		$JSVC -cp "$CLASSPATH" -outfile "${LOGDIR}/cloudstack-agent.out" -errfile "${LOGDIR}/cloudstack-agent.err" -pidfile "$PIDFILE" $CLASS
 		RETVAL=$?
 		echo
 	else

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9589f9fe/packaging/centos63/cloud-usage.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-usage.rc b/packaging/centos63/cloud-usage.rc
index 8bee5ae..dc97cd3 100755
--- a/packaging/centos63/cloud-usage.rc
+++ b/packaging/centos63/cloud-usage.rc
@@ -35,7 +35,8 @@
 SHORTNAME="cloudstack-usage"
 PIDFILE=/var/run/"$SHORTNAME".pid
 LOCKFILE=/var/lock/subsys/"$SHORTNAME"
-LOGFILE=/var/log/cloudstack/usage/usage.log
+LOGDIR=/var/log/cloudstack/usage
+LOGFILE=${LOGDIR}/usage.log
 PROGNAME="CloudStack Usage Monitor"
 CLASS="com.cloud.usage.UsageServer"
 PROG="jsvc"
@@ -79,7 +80,7 @@ start() {
 
     echo -n "Starting $PROGNAME" "$SHORTNAME"
 
-    if daemon --pidfile $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" -errfile SYSLOG -Dpid=$$ $CLASS
+    if daemon --pidfile $PIDFILE $DAEMON -cp "$CLASSPATH"  -outfile "${LOGDIR}/cloudstack-usage.out" -errfile "${LOGDIR}/cloudstack-usage.err" -pidfile "$PIDFILE" -user "$USER" -Dpid=$$ $CLASS
         RETVAL=$?
     then
         rc=0