Index: /trunk/psLib/src/sys/psTrace.c
===================================================================
--- /trunk/psLib/src/sys/psTrace.c	(revision 8599)
+++ /trunk/psLib/src/sys/psTrace.c	(revision 8600)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.76 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-25 00:03:35 $
+ *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-25 22:00:54 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -593,13 +593,10 @@
 
         if (traceMsg) {
-            // calculate the length of the formatted string
-            // XXX this may or may not be a performance issue
-            char line[MAX_TRACE_LENGTH];
-
             // We indent each message one space for each level of the message.
             for (int i = 0; i < level; i++) {
                 write (traceFD, " ", 1);
             }
-            vsnprintf(&line[0], MAX_TRACE_LENGTH, format, ap);
+            psString line = NULL;       // Line to print
+            psStringAppendV(&line, format, ap);
             write (traceFD, line, strlen(line));
             if (line[strlen(line) - 1] != '\n') {
@@ -647,10 +644,9 @@
     // Append the function name to the facility
     size_t facilLength = strlen(facil); // Length of facility name
-    char fullFacil[MAX_HEADER_LENGTH]; // Full facility name is the facility + the function name
-    strncpy(&fullFacil[0], facil, MAX_HEADER_LENGTH);
-    if (facilLength + 1 < MAX_HEADER_LENGTH) {
-        fullFacil[facilLength] = '.';
-        strncpy(&fullFacil[facilLength + 1], func, MAX_HEADER_LENGTH - facilLength - 1);
-    }
+    size_t funcLength = strlen(func);   // Length of function name
+    char fullFacil[facilLength + funcLength + 2]; // Full facility name is the facility + the function name
+    strcpy(&fullFacil[0], facil);
+    fullFacil[facilLength] = '.';
+    strcpy(&fullFacil[facilLength + 1], func);
 
     va_list ap;
