Changeset 1151
- Timestamp:
- Jun 30, 2004, 10:21:21 AM (22 years ago)
- Location:
- trunk/psLib/test/sysUtils
- Files:
-
- 2 edited
-
builddir/tst_psLogMsg03.d (modified) (1 diff)
-
tst_psLogMsg03.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/builddir/tst_psLogMsg03.d
r1109 r1151 3 3 ../../include/psTrace.h ../../include/psAbort.h ../../include/psError.h \ 4 4 ../../include/psString.h ../../include/psType.h ../../include/psList.h \ 5 ../../include/ps Vector.h ../../include/psHash.h \6 ../../include/ps Scalar.h ../../include/psImage.h \5 ../../include/psCompare.h ../../include/psVector.h \ 6 ../../include/psHash.h ../../include/psScalar.h ../../include/psImage.h \ 7 7 ../../include/psBitSet.h ../../include/psSort.h ../../include/psStats.h \ 8 8 ../../include/psMatrix.h ../../include/psMatrixVectorArithmetic.h \ -
trunk/psLib/test/sysUtils/tst_psLogMsg03.c
r963 r1151 15 15 int testStatus = true; 16 16 int currentId = psMemGetId(); 17 FILE* file; 18 char line[256]; 17 19 18 20 printPositiveTestHeader(stdout, … … 20 22 "psLogSetDestination()"); 21 23 22 printf("------------- psLogSetDestination(PS_LOG_NONE)-------------\n");23 psLogSetDestination( PS_LOG_NONE);24 printf("--------------- psLogSetDestination(PS_LOG_NONE) ----------------\n"); 25 psLogSetDestination("none"); 24 26 for (i=0;i<10;i++) { 25 27 psLogMsg(__func__, i, "Hello World! My level is %d\n", i); … … 27 29 28 30 printf("------------- psLogSetDestination(PS_LOG_TO_STDERR) -------------\n"); 29 psLogSetDestination( PS_LOG_TO_STDERR);31 psLogSetDestination("dest:stderr"); 30 32 for (i=0;i<10;i++) { 31 33 psLogMsg(__func__, i, "Hello World! My level is %d\n", i); … … 33 35 34 36 printf("------------- psLogSetDestination(PS_LOG_TO_STDOUT) -------------\n"); 35 psLogSetDestination( PS_LOG_TO_STDOUT);37 psLogSetDestination("dest:stdout"); 36 38 for (i=0;i<10;i++) { 37 39 psLogMsg(__func__, i, "Hello World! My level is %d\n", i); 38 40 } 41 printf("--------------- psLogSetDestination(""file:log.txt"") ---------------\n"); 42 psLogSetDestination("file:log.txt"); 43 for (i=0;i<10;i++) { 44 psLogMsg(__func__, i, "Hello World! My level is %d\n", i); 45 } 46 47 psLogSetDestination("none"); 48 printf("--------------------- The Contents of log.txt -------------------\n"); 49 file = fopen("log.txt","r"); 50 while ( fgets(line,256,file) != NULL ) { 51 printf("%s",line); 52 } 53 fclose(file); 39 54 40 55 printFooter(stdout,
Note:
See TracChangeset
for help on using the changeset viewer.
