Changeset 1385 for trunk/psLib/src/sys/psLogMsg.c
- Timestamp:
- Aug 4, 2004, 1:37:39 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psLogMsg.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psLogMsg.c
r1153 r1385 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-0 6-30 20:22:37$13 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-04 23:37:39 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 132 132 psError(__func__,"The location, %s, for protocol 'dest' is invalid.",location); 133 133 return 1; 134 } else if (strcmp(protocol,"file") == 0) { 135 FILE* file = fopen(location,"w"); 136 if (file == NULL) { 137 psError(__func__,"Could not open file '%s' for output.",location); 138 return 1; 139 } 140 if (logDest != NULL && logDest != stderr && logDest != stdout) { 141 fclose(logDest); 142 } 143 logDest = file; 144 return 0; 145 } 134 } else 135 if (strcmp(protocol,"file") == 0) { 136 FILE* file = fopen(location,"w"); 137 if (file == NULL) { 138 psError(__func__,"Could not open file '%s' for output.",location); 139 return 1; 140 } 141 if (logDest != NULL && logDest != stderr && logDest != stdout) { 142 fclose(logDest); 143 } 144 logDest = file; 145 return 0; 146 } 146 147 147 148 psError(__func__,"Do not know how to handle the protocol '%s'.",protocol); … … 336 337 if (head_ptr > head) { 337 338 *head_ptr++ = '|'; 338 } else if (!logMsg) { // no output desired 339 return; 340 } 339 } else 340 if (!logMsg) { // no output desired 341 return; 342 } 341 343 *head_ptr = '\0'; 342 344
Note:
See TracChangeset
for help on using the changeset viewer.
