Changeset 1151 for trunk/psLib/test/sysUtils/tst_psLogMsg03.c
- Timestamp:
- Jun 30, 2004, 10:21:21 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sysUtils/tst_psLogMsg03.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
