Index: trunk/psLib/test/sys/tst_psLogMsg.c
===================================================================
--- trunk/psLib/test/sys/tst_psLogMsg.c	(revision 4955)
+++ trunk/psLib/test/sys/tst_psLogMsg.c	(revision 4979)
@@ -16,4 +16,5 @@
 static psS32 testLogMsg04();
 static psS32 testLogMsg05();
+static psS32 testLogMsg06();
 
 testDescription tests[] = {
@@ -35,4 +36,7 @@
                               {
                                   testLogMsg05, 5, "psLogSetDestination()", 0, false
+                              },
+                              {
+                                  testLogMsg06, 6, "psMessageDestination()", 0, false
                               },
                               {
@@ -236,2 +240,64 @@
     return 0;
 }
+
+psS32 testLogMsg06()
+{
+    psS32 i = 0;
+    //    FILE* file;
+    int fd;
+    //    char line[256];
+
+    printf("--------------- psMessageDestination(PS_LOG_NONE) ----------------\n");
+    psMessageDestination("none");
+    //    psLogSetDestination(0);
+    for (i=0;i<10;i++) {
+        psLogMsg(__func__, i, "Hello World!  My level is %d\n", i);
+    }
+
+    printf("------------- psMessageDestination(PS_LOG_TO_STDERR) -------------\n");
+    psMessageDestination("dest:stderr");
+    //    psLogSetDestination(2);
+    for (i=0;i<10;i++) {
+        psLogMsg(__func__, i, "Hello World!  My level is %d\n", i);
+    }
+
+    printf("------------- psMessageDestination(PS_LOG_TO_STDOUT) -------------\n");
+    psMessageDestination("dest:stdout");
+    //    psLogSetDestination(1);
+    for (i=0;i<10;i++) {
+        psLogMsg(__func__, i, "Hello World!  My level is %d\n", i);
+    }
+
+    printf("--------------- psMessageDestination(""file:log2.txt"") ---------------\n");
+    fd = creat("log2.txt", 0666);
+    psMessageDestination("file:log2.txt");
+    //    psLogSetDestination(fd);
+    for (i=0;i<10;i++) {
+        psLogMsg(__func__, i, "Hello World!  My level is %d\n", i);
+    }
+
+
+    psMessageDestination("none");
+    FILE *file;
+    char line[257];
+    //    psMessageDestination(-1);
+    //    psLogSetDestination(0);
+    printf("--------------------- The Contents of log2.txt -------------------\n");
+    file = fopen("log2.txt","r");
+    while ( fgets(line,256,file) != NULL ) {
+        printf("%s",line);
+    }
+    fclose(file);
+    close(fd);
+
+    int fd2 = creat("/eva/log2.txt", 0666);
+    printf("--------------- psMessageDestination(""file:/eva/log.txt"") ----------\n");
+    psMessageDestination("file:/eva/log2.txt");
+    //    psLogSetDestination(fd2);
+    for ( i=0;i<10;i++) {
+        psLogMsg(__func__, i, "Hello World! My level is %d\n", i);
+    }
+    close(fd2);
+
+    return 0;
+}
Index: trunk/psLib/test/sys/verified/tst_psLogMsg.stderr
===================================================================
--- trunk/psLib/test/sys/verified/tst_psLogMsg.stderr	(revision 4955)
+++ trunk/psLib/test/sys/verified/tst_psLogMsg.stderr	(revision 4979)
@@ -167,2 +167,19 @@
 ---> TESTPOINT PASSED (psLogMsg{psLogSetDestination()} | tst_psLogMsg.c)
 
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psLogMsg.c                                             *
+*            TestPoint: psLogMsg{psMessageDestination()}                           *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+<DATE><TIME>|<HOST>|A|testLogMsg06
+    Hello World!  My level is 0
+<DATE><TIME>|<HOST>|E|testLogMsg06
+    Hello World!  My level is 1
+<DATE><TIME>|<HOST>|W|testLogMsg06
+    Hello World!  My level is 2
+<DATE><TIME>|<HOST>|I|testLogMsg06
+    Hello World!  My level is 3
+
+---> TESTPOINT PASSED (psLogMsg{psMessageDestination()} | tst_psLogMsg.c)
+
Index: trunk/psLib/test/sys/verified/tst_psLogMsg.stdout
===================================================================
--- trunk/psLib/test/sys/verified/tst_psLogMsg.stdout	(revision 4955)
+++ trunk/psLib/test/sys/verified/tst_psLogMsg.stdout	(revision 4979)
@@ -21,2 +21,24 @@
     Hello World!  My level is 3
 --------------- psLogSetDestination(file:/eva/log.txt) ----------
+--------------- psMessageDestination(PS_LOG_NONE) ----------------
+------------- psMessageDestination(PS_LOG_TO_STDERR) -------------
+------------- psMessageDestination(PS_LOG_TO_STDOUT) -------------
+<DATE><TIME>|<HOST>|A|testLogMsg06
+    Hello World!  My level is 0
+<DATE><TIME>|<HOST>|E|testLogMsg06
+    Hello World!  My level is 1
+<DATE><TIME>|<HOST>|W|testLogMsg06
+    Hello World!  My level is 2
+<DATE><TIME>|<HOST>|I|testLogMsg06
+    Hello World!  My level is 3
+--------------- psMessageDestination(file:log2.txt) ---------------
+--------------------- The Contents of log2.txt -------------------
+<DATE><TIME>|<HOST>|A|testLogMsg06
+    Hello World!  My level is 0
+<DATE><TIME>|<HOST>|E|testLogMsg06
+    Hello World!  My level is 1
+<DATE><TIME>|<HOST>|W|testLogMsg06
+    Hello World!  My level is 2
+<DATE><TIME>|<HOST>|I|testLogMsg06
+    Hello World!  My level is 3
+--------------- psMessageDestination(file:/eva/log.txt) ----------
