Changeset 1696 for trunk/psLib/src/sys/psLogMsg.c
- Timestamp:
- Sep 7, 2004, 9:05:07 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psLogMsg.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psLogMsg.c
r1448 r1696 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.2 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-0 8-10 01:55:34$14 * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-09-07 19:05:07 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 41 41 #include "psTrace.h" 42 42 43 #include "psSysUtilsErrors.h" 44 #define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psLogMsg." 45 43 46 #define MIN_LOG_LEVEL 0 44 47 #define MAX_LOG_LEVEL 9 45 48 46 49 #define MAX_LOG_LINE_LENGTH 128 50 51 47 52 static FILE *logDest = (FILE *) 1; // flag to initialize to stderr before using. 48 53 static int globalLogLevel = PS_LOG_INFO; // log all messages at this or above … … 108 113 109 114 if (sscanf(dest, "%4s:%256s", protocol, location) < 2) { 110 psError(__func__, "The specified destination, %s, is malformed.", dest); 115 psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID, 116 PS_ERRORTEXT_psLogSetDestination_DESTINATION_MALFORMED, 117 dest); 111 118 return false; 112 119 } … … 127 134 return true; 128 135 } 129 psError(__func__, "The location, %s, for protocol 'dest' is invalid.", location); 136 psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID, 137 PS_ERRORTEXT_psLogSetDestination_DEST_LOCATION_INVALID, 138 location); 130 139 return 1; 131 140 } else if (strcmp(protocol, "file") == 0) { … … 133 142 134 143 if (file == NULL) { 135 psError(__func__, "Could not open file '%s' for output.", location); 144 psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_IO, 145 PS_ERRORTEXT_psLogSetDestination_OPEN_FILE_FAILED, 146 location); 136 147 return false; 137 148 } … … 143 154 } 144 155 145 psError(__func__, "Do not know how to handle the protocol '%s'.", protocol); 156 psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID, 157 PS_ERRORTEXT_psLogSetDestination_UNSUPPORTED_PROTOCOL, 158 protocol); 146 159 return false; 147 160 } … … 205 218 break; 206 219 default: 207 psError(__func__, "Unknown logging keyword %c", *ptr); 220 psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_VALUE, 221 PS_ERRORTEXT_psLogSetFormat_UNKNOWN_KEY, *ptr); 208 222 break; 209 223 }
Note:
See TracChangeset
for help on using the changeset viewer.
