From d10cabc91798dfaa4ccdc08b12aed7925ff8ebba Mon Sep 17 00:00:00 2001 From: Brad Gonzales Date: Tue, 28 Aug 2012 10:10:55 -0500 Subject: [PATCH] Issue #951 added Appender EnvConfigurableRollingFileAppender. Change-Id: Icfab60803c647afad6aa30e516083e46b27be75b Former-commit-id: 4d103fe06c94b8d5067e44aaabfdac88347f9a96 --- cave/build/static/linux/alertviz/alertviz.sh | 3 +- cave/build/static/linux/cave/cave.sh | 3 +- .../ui/dialogs/AlertVisualization.java | 2 +- .../META-INF/MANIFEST.MF | 2 + .../build.properties | 3 +- .../log4j-alertviz.xml | 79 ++++++++++++++++++ .../raytheon/uf/viz/alertviz/AlertvizJob.java | 2 +- .../raytheon/uf/viz/alertviz/Container.java | 25 +++--- .../EnvConfigurableRollingFileAppender.java | 80 +++++++++++++++++++ .../uf/viz/alertviz/SystemStatusHandler.java | 33 +++++++- .../viz/alertviz/internal/LogMessageDAO.java | 2 +- .../{ArchiveLogJob.java => PurgeLogJob.java} | 31 ++----- .../META-INF/MANIFEST.MF | 2 +- .../com.raytheon.uf.viz.core/build.properties | 3 +- .../log4j-viz-core.xml | 80 +++++++++++++++++++ .../uf/viz/core/status/VizStatusHandler.java | 5 +- .../uf/viz/core/status/VizStatusInternal.java | 6 ++ .../alertviz.product | 4 +- .../awips.product | 2 +- .../developer.product | 3 +- cots/org.apache.log4j/log4j.xml | 14 ---- .../uf/common/message/StatusMessage.java | 13 ++- .../com/raytheon/uf/edex/core/EDEXUtil.java | 2 +- 23 files changed, 322 insertions(+), 77 deletions(-) create mode 100644 cave/com.raytheon.uf.viz.alertviz/log4j-alertviz.xml create mode 100644 cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/EnvConfigurableRollingFileAppender.java rename cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/{ArchiveLogJob.java => PurgeLogJob.java} (72%) create mode 100644 cave/com.raytheon.uf.viz.core/log4j-viz-core.xml diff --git a/cave/build/static/linux/alertviz/alertviz.sh b/cave/build/static/linux/alertviz/alertviz.sh index 14bf467aca..c5ad28154e 100644 --- a/cave/build/static/linux/alertviz/alertviz.sh +++ b/cave/build/static/linux/alertviz/alertviz.sh @@ -88,7 +88,8 @@ fi while [ $exitVal -ne 0 ] do curTime=`date +%Y%m%d_%H%M%S` - LOGFILE=${LOGDIR}/alertviz_${curTime}.log + LOGFILE=${LOGDIR}/alertviz_${curTime}_console.log + export LOGFILE_ALERTVIZ=${LOGDIR}/alertviz_${curTime}_admin.log #first check if we can write to the directory if [ -w ${LOGDIR} ]; then diff --git a/cave/build/static/linux/cave/cave.sh b/cave/build/static/linux/cave/cave.sh index f398806fe4..60158d1062 100644 --- a/cave/build/static/linux/cave/cave.sh +++ b/cave/build/static/linux/cave/cave.sh @@ -116,7 +116,8 @@ fi export pid=$$ curTime=`date +%Y%m%d_%H%M%S` -LOGFILE=${LOGDIR}/cave_${curTime}_pid_${pid}.log +LOGFILE=${LOGDIR}/cave_${curTime}_pid_${pid}_console.log +export LOGFILE_CAVE=${LOGDIR}/cave_${curTime}_pid_${pid}_alertviz.log redirect="TRUE" for flag in $@; do diff --git a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisualization.java b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisualization.java index 453e8d4e6f..0e06626033 100644 --- a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisualization.java +++ b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisualization.java @@ -632,7 +632,7 @@ public class AlertVisualization implements ITimerAction, IAudioAction, || statMsg.getSourceKey().equals("GDN_ADMIN"); if (isGdnAdminMessage) { - Container.logInternal(statMsg); + // Container.logInternal(statMsg); if ((statMsg.getDetails() != null) && (statMsg.getDetails().contains("Error") || statMsg.getDetails().contains("Exception") diff --git a/cave/com.raytheon.uf.viz.alertviz/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.alertviz/META-INF/MANIFEST.MF index 47f917f9e1..a01b3154bd 100644 --- a/cave/com.raytheon.uf.viz.alertviz/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.alertviz/META-INF/MANIFEST.MF @@ -29,3 +29,5 @@ Import-Package: com.raytheon.uf.common.python, com.raytheon.uf.viz.python.swt, com.raytheon.uf.viz.python.swt.widgets Bundle-ActivationPolicy: lazy +Eclipse-BuddyPolicy: ext, registered, global +Eclipse-RegisterBuddy: org.apache.log4j diff --git a/cave/com.raytheon.uf.viz.alertviz/build.properties b/cave/com.raytheon.uf.viz.alertviz/build.properties index e510dff0db..bf04d95cd1 100644 --- a/cave/com.raytheon.uf.viz.alertviz/build.properties +++ b/cave/com.raytheon.uf.viz.alertviz/build.properties @@ -6,4 +6,5 @@ bin.includes = META-INF/,\ lib/derbyrun.jar,\ lib/derby.jar,\ statusMessage.xsd,\ - config.xml + config.xml,\ + log4j-alertviz.xml diff --git a/cave/com.raytheon.uf.viz.alertviz/log4j-alertviz.xml b/cave/com.raytheon.uf.viz.alertviz/log4j-alertviz.xml new file mode 100644 index 0000000000..89e5ae4716 --- /dev/null +++ b/cave/com.raytheon.uf.viz.alertviz/log4j-alertviz.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertvizJob.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertvizJob.java index 0a0f8d40df..66cce214a4 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertvizJob.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertvizJob.java @@ -230,7 +230,7 @@ public class AlertvizJob extends Job { e); StatusMessage sm = new StatusMessage(); sm.setPriority(Priority.CRITICAL); - sm.setMachine("LOCAL"); + sm.setMachineToCurrent(); sm.setCategory("GDN_ADMIN"); sm.setSourceKey("GDN_ADMIN"); sm.setMessage(e.getMessage()); diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java index 7062fd2a67..ab7a5f4bf7 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java @@ -36,7 +36,7 @@ import com.raytheon.uf.viz.alertviz.config.Category; import com.raytheon.uf.viz.alertviz.config.Configuration; import com.raytheon.uf.viz.alertviz.config.ForcedConfiguration; import com.raytheon.uf.viz.alertviz.config.Source; -import com.raytheon.uf.viz.alertviz.internal.ArchiveLogJob; +import com.raytheon.uf.viz.alertviz.internal.PurgeLogJob; import com.raytheon.uf.viz.alertviz.internal.LogMessageDAO; import com.raytheon.uf.viz.core.VizApp; @@ -63,8 +63,8 @@ public class Container implements IConfigurationChangedListener { public static final String SOURCE_MISSING = "Source was not found"; - private transient static final org.apache.log4j.Logger internalLogger = Logger - .getLogger("AlertVizLogger"); + private transient static final org.apache.log4j.Logger adminLogger = Logger + .getLogger("AlertVizAdminLogger"); private Configuration configuration; @@ -96,7 +96,7 @@ public class Container implements IConfigurationChangedListener { .getForcedConfiguration(); ConfigurationManager.getInstance().addListener(this); this.callbacks = callbacks; - ArchiveLogJob archive = new ArchiveLogJob(); + PurgeLogJob archive = new PurgeLogJob(); archive.schedule(); } @@ -171,7 +171,7 @@ public class Container implements IConfigurationChangedListener { // for now, just send to the regular log StatusMessage sm = new StatusMessage(); sm.setPriority(priority); - sm.setMachine("LOCAL"); + sm.setMachineToCurrent(); sm.setSourceKey("GDN_ADMIN"); sm.setCategory("GDN)ADMIN"); sm.setMessage(msg); @@ -319,24 +319,25 @@ public class Container implements IConfigurationChangedListener { String cat = message.getCategory(); String source = message.getSourceKey(); - if ((cat != null && cat.equalsIgnoreCase("GDN_ADMIN")) - || (source != null && source.equalsIgnoreCase("GDN_ADMIN"))) { + boolean isInternal = (cat != null && cat.equalsIgnoreCase("GDN_ADMIN")) + || (source != null && source.equalsIgnoreCase("GDN_ADMIN")); + if (isInternal) { switch (message.getPriority()) { case CRITICAL: - internalLogger.fatal(message); + adminLogger.fatal(message); break; case SIGNIFICANT: - internalLogger.error(message); + adminLogger.error(message); break; case PROBLEM: - internalLogger.warn(message); + adminLogger.warn(message); break; case EVENTA: // fall through case EVENTB: - internalLogger.info(message); + adminLogger.info(message); break; case VERBOSE: - internalLogger.debug(message); + adminLogger.debug(message); break; } } diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/EnvConfigurableRollingFileAppender.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/EnvConfigurableRollingFileAppender.java new file mode 100644 index 0000000000..dc7bc3fa6c --- /dev/null +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/EnvConfigurableRollingFileAppender.java @@ -0,0 +1,80 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.uf.viz.alertviz; + +import org.apache.log4j.RollingFileAppender; +import org.apache.log4j.helpers.LogLog; + +/** + * RollingFileAppender retrieves the value set for property EnvLogVar from the + * system environment to define the log file. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Sep 10, 2012            bgonzale     Initial creation
+ * 
+ * 
+ * + * @author bgonzale + * @version 1.0 + */ + +public class EnvConfigurableRollingFileAppender extends RollingFileAppender { + + private String envLogVar; + + /** + * @param envLogVar + * the envLogVar to set + */ + public void setEnvLogVar(String envLogVar) { + this.envLogVar = envLogVar; + setFileFromEnv(); + } + + /** + * @return the envLogVar + */ + public String getEnvLogVar() { + return envLogVar; + } + + private void setFileFromEnv() { + if (envLogVar == null || envLogVar.isEmpty()) { + LogLog.error("Appender [" + name + + "] requires EnvLogVar to be set."); + } else { + String file = System.getenv(envLogVar); + + if (file == null || file.isEmpty()) { + LogLog.error("Appender [" + name + + "] needs environment variable, " + envLogVar + + ", to be set."); + } else { + setFile(file); + } + } + } + +} diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/SystemStatusHandler.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/SystemStatusHandler.java index cd63a3efa0..36d0ec29fa 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/SystemStatusHandler.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/SystemStatusHandler.java @@ -19,6 +19,7 @@ **/ package com.raytheon.uf.viz.alertviz; +import org.apache.log4j.Logger; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.ErrorDialog; @@ -50,6 +51,9 @@ import com.raytheon.uf.viz.core.status.VizStatusInternal; public class SystemStatusHandler extends AbstractStatusHandler { + private transient static final org.apache.log4j.Logger logger = Logger + .getLogger("CaveLogger"); + private static final String WORKSTATION = "WORKSTATION"; /* @@ -66,14 +70,13 @@ public class SystemStatusHandler extends AbstractStatusHandler { if (status instanceof VizStatusInternal) { VizStatusInternal vs = (VizStatusInternal) status; - sm = new StatusMessage(vs.getSource(), vs.getCategory(), - vs.getPriority(), vs.getPluginName(), vs.getMessage(), - vs.getException()); + sm = vs.toStatusMessage(); } else { sm = from(status); } try { + logStatus(sm); AlertVizClient.sendMessage(sm); } catch (final AlertvizException e) { // not a good situation, since we can't communicate with the log @@ -111,7 +114,7 @@ public class SystemStatusHandler extends AbstractStatusHandler { StatusMessage sm = new StatusMessage(); sm.setCategory(WORKSTATION); - sm.setMachine("LOCAL"); + sm.setMachineToCurrent(); switch (status.getSeverity()) { case Status.ERROR: sm.setPriority(Priority.SIGNIFICANT); @@ -184,4 +187,26 @@ public class SystemStatusHandler extends AbstractStatusHandler { int count) throws AlertvizException { return LogMessageDAO.getInstance().load(count, category); } + + private void logStatus(StatusMessage status) { + switch (status.getPriority()) { + case CRITICAL: + logger.fatal(status); + break; + case SIGNIFICANT: + logger.error(status); + break; + case PROBLEM: + logger.warn(status); + break; + case EVENTA: // fall through + case EVENTB: + logger.info(status); + break; + case VERBOSE: + logger.debug(status); + break; + } + } + } diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/LogMessageDAO.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/LogMessageDAO.java index 1544f20e4f..e6edd3f40e 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/LogMessageDAO.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/LogMessageDAO.java @@ -250,7 +250,7 @@ public class LogMessageDAO { } public void save(StatusMessage sm) throws AlertvizException { - // Container.logInternal(sm); + Container.logInternal(sm); synchronized (this) { boolean errorOccurred = false; ResultSet rs = null; diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/ArchiveLogJob.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/PurgeLogJob.java similarity index 72% rename from cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/ArchiveLogJob.java rename to cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/PurgeLogJob.java index 3ef2fd7002..ef77d866c8 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/ArchiveLogJob.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/internal/PurgeLogJob.java @@ -19,7 +19,6 @@ **/ package com.raytheon.uf.viz.alertviz.internal; -import java.io.File; import java.sql.Timestamp; import org.eclipse.core.runtime.IProgressMonitor; @@ -32,13 +31,9 @@ import org.eclipse.swt.widgets.Display; import com.raytheon.uf.viz.alertviz.Activator; import com.raytheon.uf.viz.alertviz.AlertvizException; import com.raytheon.uf.viz.alertviz.Constants; -import com.raytheon.uf.viz.alertviz.LogUtil; -import com.raytheon.uf.viz.alertviz.LogUtil.Order; -import com.raytheon.uf.viz.core.VizApp; -import com.raytheon.uf.viz.core.localization.LocalizationManager; /** - * Purges the database, and archives the old log entries to a text file + * Purges old database entries. * *
  * SOFTWARE HISTORY
@@ -50,26 +45,16 @@ import com.raytheon.uf.viz.core.localization.LocalizationManager;
  * @author chammack
  * @version 1.0
  */
-public class ArchiveLogJob extends Job {
-
-    private int numberOfLogsToKeep;
+public class PurgeLogJob extends Job {
 
     private int ageOfLogInHours;
 
-    private static final int DEFAULT_NUMBER_OF_LOGS = 10;
-
     private static final int DEFAULT_AGE_OF_LOG_IN_HRS = 12;
 
     private static final int MILLISECONDS_IN_HOUR = 60 * 60 * 1000;
 
-    public ArchiveLogJob() {
-        super("Archive Log");
-        this.setSystem(true);
-        numberOfLogsToKeep = Activator.getDefault().getPreferenceStore()
-                .getInt(Constants.P_NUMBER_OF_LOGS);
-        if (numberOfLogsToKeep == 0) {
-            this.numberOfLogsToKeep = DEFAULT_NUMBER_OF_LOGS;
-        }
+    public PurgeLogJob() {
+        super("Archive Log Purge");
 
         ageOfLogInHours = Activator.getDefault().getPreferenceStore()
                 .getInt(Constants.P_MAX_AGE_OF_LOGS);
@@ -90,14 +75,8 @@ public class ArchiveLogJob extends Job {
             long now = System.currentTimeMillis();
 
             if ((now - lastPurgeInMs) > (ageOfLogInHours * MILLISECONDS_IN_HOUR)) {
-                String s = LocalizationManager.getUserDir() + "textLogs"
-                        + File.separator + VizApp.getHostName()
-                        + File.separator + "log";
-                LogUtil.rollLogs(s, numberOfLogsToKeep);
-
                 Timestamp ts = new Timestamp(now
                         - (ageOfLogInHours * MILLISECONDS_IN_HOUR));
-                LogUtil.saveLogToFile(new File(s + ".0"), ts, Order.BEFORE);
                 LogMessageDAO.getInstance().purge(ts);
             }
         } catch (AlertvizException e) {
@@ -111,7 +90,7 @@ public class ArchiveLogJob extends Job {
                             .openError(
                                     Display.getDefault().getActiveShell(),
                                     "Error",
-                                    "Error rotating saving and rotating logs.  Archived logs may not be stored",
+                            "Error purging logs.",
                                     s);
                 }
 
diff --git a/cave/com.raytheon.uf.viz.core/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.core/META-INF/MANIFEST.MF
index 89b97e5e13..72674e0fd2 100644
--- a/cave/com.raytheon.uf.viz.core/META-INF/MANIFEST.MF
+++ b/cave/com.raytheon.uf.viz.core/META-INF/MANIFEST.MF
@@ -34,7 +34,7 @@ Require-Bundle: org.eclipse.ui,
  com.raytheon.uf.common.geospatial;bundle-version="1.12.1174"
 Bundle-ActivationPolicy: lazy
 Eclipse-BuddyPolicy: ext, registered, global
-Eclipse-RegisterBuddy: org.apache.velocity, com.raytheon.edex.common, com.raytheon.uf.common.serialization, com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.status, com.raytheon.uf.common.dataplugin.level
+Eclipse-RegisterBuddy: org.apache.velocity, org.apache.log4j, com.raytheon.edex.common, com.raytheon.uf.common.serialization, com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.status, com.raytheon.uf.common.dataplugin.level
 Export-Package: com.raytheon.uf.viz.core,
  com.raytheon.uf.viz.core.alerts,
  com.raytheon.uf.viz.core.auth,
diff --git a/cave/com.raytheon.uf.viz.core/build.properties b/cave/com.raytheon.uf.viz.core/build.properties
index 1e00c2055d..b2c38e2262 100644
--- a/cave/com.raytheon.uf.viz.core/build.properties
+++ b/cave/com.raytheon.uf.viz.core/build.properties
@@ -5,4 +5,5 @@ bin.includes = META-INF/,\
                plugin.xml,\
                config.xml,\
                scriptTemplates/,\
-               schema/
+               schema/,\
+               log4j-viz-core.xml
diff --git a/cave/com.raytheon.uf.viz.core/log4j-viz-core.xml b/cave/com.raytheon.uf.viz.core/log4j-viz-core.xml
new file mode 100644
index 0000000000..e733dcd2cb
--- /dev/null
+++ b/cave/com.raytheon.uf.viz.core/log4j-viz-core.xml
@@ -0,0 +1,80 @@
+
+ 
+
+    
+       
+          
+       
+      
+         
+         
+      
+   
+
+   
+       
+       
+       
+          
+       
+   
+   
+   
+      
+      
+      
+      
+       
+          
+      
+       
+   
+   
+      
+      
+    
+   
+      
+      
+   
+
+   
+      
+   
+
+   
+      
+   
+   
+      
+   
+   
+      
+   
+   
+      
+   
+   
+      
+   
+   
+      
+   
+   
+      
+   
+   
+      
+   
+   
+      
+   
+   
+      
+   
+    
+       
+       
+      
+     
+ 
diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java
index 540efa32de..9f176e9b80 100644
--- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java
+++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusHandler.java
@@ -88,8 +88,9 @@ public class VizStatusHandler implements IUFStatusHandler {
                 this.source = factory.getSource(source, pluginId);
             }
         }
-        StatusManager.getManager().handle(
-                new VizStatusInternal(status, category, source, pluginId));
+        VizStatusInternal vizStatus = new VizStatusInternal(status, category,
+                source, pluginId);
+        StatusManager.getManager().handle(vizStatus);
     }
 
     @Override
diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusInternal.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusInternal.java
index 824446a7ec..f9276a0817 100644
--- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusInternal.java
+++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/status/VizStatusInternal.java
@@ -22,6 +22,7 @@ package com.raytheon.uf.viz.core.status;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 
+import com.raytheon.uf.common.message.StatusMessage;
 import com.raytheon.uf.common.status.UFStatus;
 
 /**
@@ -170,4 +171,9 @@ public class VizStatusInternal extends UFStatus implements IStatus {
         return pluginName;
     }
 
+    public StatusMessage toStatusMessage() {
+        return new StatusMessage(this.source, this.category, this.priority,
+                this.pluginName, this.message, this.exception);
+    }
+
 }
diff --git a/cave/com.raytheon.uf.viz.product.alertviz/alertviz.product b/cave/com.raytheon.uf.viz.product.alertviz/alertviz.product
index 6ef6dbabfc..d86760b293 100644
--- a/cave/com.raytheon.uf.viz.product.alertviz/alertviz.product
+++ b/cave/com.raytheon.uf.viz.product.alertviz/alertviz.product
@@ -20,12 +20,11 @@ Developed on the Raytheon Visualization Environment (viz)
    
       -data @user.home/caveData -user @user.home/caveData -clean
       -consoleLog
-      -Xincgc -Xmx256M -Xss2024k -Dosgi.instance.area.readOnly=true -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler -Dorg.eclipse.update.reconcile=false -Dqpid.dest_syntax=BURL -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
+      -Xincgc -Xmx256M -Xss2024k -Dosgi.instance.area.readOnly=true -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler -Dorg.eclipse.update.reconcile=false -Dqpid.dest_syntax=BURL -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dlog4j.configuration=log4j-alertviz.xml
    
 
    
 
-
    
       
       
@@ -39,7 +38,6 @@ Developed on the Raytheon Visualization Environment (viz)
       
    
 
-
    
       jdk1.6.0
       jdk1.6.0
diff --git a/cave/com.raytheon.viz.product.awips/awips.product b/cave/com.raytheon.viz.product.awips/awips.product
index 3cc36a42e4..57c85fc1c1 100644
--- a/cave/com.raytheon.viz.product.awips/awips.product
+++ b/cave/com.raytheon.viz.product.awips/awips.product
@@ -18,7 +18,7 @@
       -consoleLog
       -Xincgc -Xmx1280M -Dosgi.instance.area.readOnly=true 
 -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler 
--XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:OnOutOfMemoryError="capture -t no -p $pid &"
+-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:OnOutOfMemoryError="capture -t no -p $pid &" -Dlog4j.configuration=log4j-viz-core.xml
       -Dfile.encoding=UTF-8
    
 
diff --git a/cave/com.raytheon.viz.product.awips/developer.product b/cave/com.raytheon.viz.product.awips/developer.product
index a7807868e5..e444cabd71 100644
--- a/cave/com.raytheon.viz.product.awips/developer.product
+++ b/cave/com.raytheon.viz.product.awips/developer.product
@@ -17,7 +17,7 @@
       -data @user.home/caveData -user @user.home/caveData -clean -consoleLog -alertviz
       -Xincgc -Xmx1024M -Dosgi.instance.area.readOnly=true 
 -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler 
--XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
+-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dlog4j.configuration=log4j-viz-core.xml
       -Dfile.encoding=UTF-8
    
 
@@ -36,7 +36,6 @@
    
 
    
-      jdk1.6.0
       jdk1.6.0
    
 
diff --git a/cots/org.apache.log4j/log4j.xml b/cots/org.apache.log4j/log4j.xml
index 566a9d8495..afc5c8aafd 100644
--- a/cots/org.apache.log4j/log4j.xml
+++ b/cots/org.apache.log4j/log4j.xml
@@ -44,15 +44,6 @@
       
    
    
-   
-      
-         
-       
-       
-          
-      
-    
-   
    
       
       
@@ -65,11 +56,6 @@
       
    
 
-   
-      
-      
-   
-
    
       
    
diff --git a/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/StatusMessage.java b/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/StatusMessage.java
index 3aa4820d19..0505812bf5 100644
--- a/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/StatusMessage.java
+++ b/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/StatusMessage.java
@@ -21,6 +21,7 @@ package com.raytheon.uf.common.message;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.lang.management.ManagementFactory;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -62,8 +63,6 @@ public class StatusMessage implements ISerializableObject, IMessage {
 
     private static final int MAX_MESSAGE_LENGTH = 1024;
 
-    private static final String LOCAL = "LOCAL";
-
     /**
      * The source of the message
      */
@@ -162,7 +161,7 @@ public class StatusMessage implements ISerializableObject, IMessage {
         this.category = category;
         this.priority = priority;
         this.plugin = plugin;
-        this.setMachine(LOCAL);
+        this.setMachineToCurrent();
         buildMessageAndDetails(message, throwable, this);
     }
 
@@ -287,6 +286,13 @@ public class StatusMessage implements ISerializableObject, IMessage {
         this.machine = machine;
     }
 
+    /**
+     * Set to the current machine.
+     */
+    public void setMachineToCurrent() {
+        this.machine = ManagementFactory.getRuntimeMXBean().getName();
+    }
+
     /**
      * @return the message
      */
@@ -405,7 +411,6 @@ public class StatusMessage implements ISerializableObject, IMessage {
 
     @Override
     public String toString() {
-        Priority p = getPriority();
         String statusMsg = getMessage();
         String detailsMsg = getDetails();
         boolean useBothMsgs = detailsMsg.length() > statusMsg.length();
diff --git a/edexOsgi/com.raytheon.uf.edex.core/src/com/raytheon/uf/edex/core/EDEXUtil.java b/edexOsgi/com.raytheon.uf.edex.core/src/com/raytheon/uf/edex/core/EDEXUtil.java
index fef59ea4e9..7667ceb7e2 100644
--- a/edexOsgi/com.raytheon.uf.edex.core/src/com/raytheon/uf/edex/core/EDEXUtil.java
+++ b/edexOsgi/com.raytheon.uf.edex.core/src/com/raytheon/uf/edex/core/EDEXUtil.java
@@ -237,7 +237,7 @@ public class EDEXUtil implements ApplicationContextAware {
         sm.setPlugin(pluginName);
         sm.setCategory(category);
         sm.setMessage(message);
-        sm.setMachine(Integer.toString(getServerId()));
+        sm.setMachineToCurrent();
         sm.setSourceKey(source);
         sm.setDetails(details);
         sm.setEventTime(new Date());