Changeset 1731 for trunk/psLib/src/sysUtils/psLogMsg.c
- Timestamp:
- Sep 8, 2004, 11:22:47 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sysUtils/psLogMsg.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psLogMsg.c
r1716 r1731 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-09-08 00:19:21$14 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-09-08 21:22:47 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 42 42 43 43 #include "psSysUtilsErrors.h" 44 #define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psLogMsg."45 44 46 45 #define MIN_LOG_LEVEL 0 … … 113 112 114 113 if (sscanf(dest, "%4s:%256s", protocol, location) < 2) { 115 psErrorMsg( ERRORNAME_PREFIX"psLogSetDestination", true, PS_ERR_LOCATION_INVALID,114 psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID, 116 115 PS_ERRORTEXT_psLogMsg_DESTINATION_MALFORMED, 117 116 dest); … … 134 133 return true; 135 134 } 136 psErrorMsg( ERRORNAME_PREFIX"psLogSetDestination", true, PS_ERR_LOCATION_INVALID,135 psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID, 137 136 PS_ERRORTEXT_psLogMsg_DEST_LOCATION_INVALID, 138 137 location); … … 142 141 143 142 if (file == NULL) { 144 psErrorMsg( ERRORNAME_PREFIX"psLogSetDestination", true, PS_ERR_IO,143 psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_IO, 145 144 PS_ERRORTEXT_psLogMsg_OPEN_FILE_FAILED, 146 145 location); … … 154 153 } 155 154 156 psErrorMsg( ERRORNAME_PREFIX"psLogSetDestination", true, PS_ERR_LOCATION_INVALID,155 psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID, 157 156 PS_ERRORTEXT_psLogMsg_UNSUPPORTED_PROTOCOL, 158 157 protocol); … … 218 217 break; 219 218 default: 220 psErrorMsg( ERRORNAME_PREFIX"psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,219 psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE, 221 220 PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr); 222 221 break; … … 333 332 *head_ptr++ = '|'; 334 333 } 335 maxLength -= snprintf(head_ptr, maxLength, "%15.15s", name); 334 if (strlen(name) > 15) { 335 maxLength -= snprintf(head_ptr, maxLength, "+%14.14s", &name[strlen(name)-14]); 336 } else { 337 maxLength -= snprintf(head_ptr, maxLength, "%15.15s", name); 338 } 339 336 340 head_ptr += strlen(head_ptr); 337 341 }
Note:
See TracChangeset
for help on using the changeset viewer.
