Index: trunk/psLib/src/sysUtils/psLogMsg.c
===================================================================
--- trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1731)
+++ trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1761)
@@ -12,6 +12,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-08 21:22:47 $
+ *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-09 21:59:03 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -302,4 +302,5 @@
         psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, fmt);
         level = (level < 0) ? 0 : 9;
+        clevel = level + '0';
         break;
     }
@@ -327,14 +328,9 @@
         head_ptr += strlen(head_ptr);
     }
-    // The name field must be 15 characters.
     if (logName) {
         if (head_ptr > head) {
             *head_ptr++ = '|';
         }
-        if (strlen(name) > 15) {
-            maxLength -= snprintf(head_ptr, maxLength, "+%14.14s", &name[strlen(name)-14]);
-        } else {
-            maxLength -= snprintf(head_ptr, maxLength, "%15.15s", name);
-        }
+        maxLength -= snprintf(head_ptr, maxLength, "%s", name);
 
         head_ptr += strlen(head_ptr);
@@ -342,5 +338,5 @@
 
     if (head_ptr > head) {
-        *head_ptr++ = '|';
+        *head_ptr++ = '\n';
     } else if (!logMsg) {                  // no output desired
         return;
@@ -350,7 +346,13 @@
     fputs(head, logDest);
     if (logMsg) {
-        vfprintf(logDest, fmt, ap);
-        if (fmt[strlen(fmt) - 1] != '\n') {
-            fputc('\n', logDest);
+        char msg[1024];
+        char* msgPtr;
+        vsnprintf(msg,1024, fmt, ap);  // create message
+
+        // detect multiple lines in message and indent each line by 4 spaces.
+        char* line = strtok_r(msg,"\n",&msgPtr);
+        while (line != NULL) {
+            fprintf(logDest,"    %s\n",line);
+            line = strtok_r(NULL,"\n",&msgPtr);
         }
     } else {
