Index: trunk/psLib/src/sysUtils/psLogMsg.c
===================================================================
--- trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1448)
+++ trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1696)
@@ -12,6 +12,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-10 01:55:34 $
+ *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-07 19:05:07 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,8 +41,13 @@
 #include "psTrace.h"
 
+#include "psSysUtilsErrors.h"
+#define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psLogMsg."
+
 #define MIN_LOG_LEVEL 0
 #define MAX_LOG_LEVEL 9
 
 #define MAX_LOG_LINE_LENGTH 128
+
+
 static FILE *logDest = (FILE *) 1;      // flag to initialize to stderr before using.
 static int globalLogLevel = PS_LOG_INFO;        // log all messages at this or above
@@ -108,5 +113,7 @@
 
     if (sscanf(dest, "%4s:%256s", protocol, location) < 2) {
-        psError(__func__, "The specified destination, %s, is malformed.", dest);
+        psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
+                   PS_ERRORTEXT_psLogSetDestination_DESTINATION_MALFORMED,
+                   dest);
         return false;
     }
@@ -127,5 +134,7 @@
             return true;
         }
-        psError(__func__, "The location, %s, for protocol 'dest' is invalid.", location);
+        psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
+                   PS_ERRORTEXT_psLogSetDestination_DEST_LOCATION_INVALID,
+                   location);
         return 1;
     } else if (strcmp(protocol, "file") == 0) {
@@ -133,5 +142,7 @@
 
         if (file == NULL) {
-            psError(__func__, "Could not open file '%s' for output.", location);
+            psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_IO,
+                       PS_ERRORTEXT_psLogSetDestination_OPEN_FILE_FAILED,
+                       location);
             return false;
         }
@@ -143,5 +154,7 @@
     }
 
-    psError(__func__, "Do not know how to handle the protocol '%s'.", protocol);
+    psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
+               PS_ERRORTEXT_psLogSetDestination_UNSUPPORTED_PROTOCOL,
+               protocol);
     return false;
 }
@@ -205,5 +218,6 @@
             break;
         default:
-            psError(__func__, "Unknown logging keyword %c", *ptr);
+            psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_VALUE,
+                       PS_ERRORTEXT_psLogSetFormat_UNKNOWN_KEY, *ptr);
             break;
         }
