Changeset 6479
- Timestamp:
- Feb 23, 2006, 6:02:19 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/config/pmConfig.c
r6448 r6479 3 3 * @author PAP, IfA 4 4 * 5 * @version $Revision: 1.7.4. 1$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-02- 17 17:13:41$5 * @version $Revision: 1.7.4.2 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-02-24 04:02:19 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 11 11 #include <stdio.h> 12 12 #include <string.h> 13 #include <unistd.h> 13 14 #include "pslib.h" 14 15 #include "pmConfig.h" … … 217 218 psString logDest = psMetadataLookupStr(&mdok, *site, "LOGDEST"); 218 219 if (mdok && logDest) { 219 // XXX: Only stdout isprovided for now; this section should be220 // XXX: Only stdout and stderr are provided for now; this section should be 220 221 // expanded in the future to do files, and perhaps even sockets. 221 if (strcasecmp(logDest, "STDOUT") != 0) { 222 psLogMsg(__func__, PS_LOG_WARN, "Only STDOUT is currently supported as a log destination.\n"); 222 int logFD = STDIN_FILENO; // a known invalid value 223 if (!strcasecmp(logDest, "STDOUT")) { 224 logFD = STDOUT_FILENO; 225 } 226 if (!strcasecmp(logDest, "STDERR")) { 227 logFD = STDERR_FILENO; 228 } 229 if (logFD == STDIN_FILENO) { 230 psLogMsg(__func__, PS_LOG_WARN, "Only STDERR and STDOUT currently supported as a log destination.\n"); 231 logFD = STDERR_FILENO; 223 232 } 224 233 psTrace(__func__, 7, "Setting log destination to STDOUT.\n"); 225 // XXX: Use something other than "1" 226 psLogSetDestination(1); 227 } 228 234 psLogSetDestination(logFD); 235 } 229 236 230 237 //
Note:
See TracChangeset
for help on using the changeset viewer.
