Index: trunk/psLib/src/sys/psLogMsg.c
===================================================================
--- trunk/psLib/src/sys/psLogMsg.c	(revision 28404)
+++ trunk/psLib/src/sys/psLogMsg.c	(revision 30595)
@@ -291,10 +291,11 @@
         head_ptr += strlen(head_ptr);
     }
-    // Hostname should be 20 characters.
+
+    // Hostname should be 10 characters.
     if (logHost) {
         if (head_ptr > head) {
             *head_ptr++ = '|';
         }
-        maxLength -= snprintf(head_ptr, maxLength, "%-20s", hostname);
+        maxLength -= snprintf(head_ptr, maxLength, " %s ", hostname);
         head_ptr += strlen(head_ptr);
     }
@@ -310,12 +311,15 @@
             *head_ptr++ = '|';
         }
-        maxLength -= snprintf(head_ptr, maxLength, "%s", name);
+        maxLength -= snprintf(head_ptr, maxLength, "%s|\n", name);
 
         head_ptr += strlen(head_ptr);
-    }
-
-    if (head_ptr > head) {
-        *head_ptr++ = '\n';
-    } else if (!logMsg) {                  // no output desired
+    } else {
+      if (head_ptr > head) {
+	*head_ptr++ = '|';
+      }
+    }
+
+    // rather than putting in a return for the message, let's only put in the return if we asked for the function name
+    if ((head_ptr == head) && !logMsg) { // no output desired
         return;
     }
@@ -332,5 +336,5 @@
         char *line = strtok_r(msg, "\n", &msgPtr);
         while (line) {
-            if(write(logFD, "    ", 4)) {;} // ignore return value
+            if(write(logFD, "          ", PS_MIN(2*level, 10))) {;} // ignore return value
             if(write(logFD, line, strlen(line))) {;} // ignore return value
             if(write(logFD, "\n", 1)) {;} // ignore return value
