IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 8, 2004, 11:22:47 AM (22 years ago)
Author:
desonia
Message:

changed the naming conventions of errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psLogMsg.c

    r1716 r1731  
    1212 *  @author George Gusciora, MHPCC
    1313 *
    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 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242
    4343#include "psSysUtilsErrors.h"
    44 #define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psLogMsg."
    4544
    4645#define MIN_LOG_LEVEL 0
     
    113112
    114113    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,
    116115                   PS_ERRORTEXT_psLogMsg_DESTINATION_MALFORMED,
    117116                   dest);
     
    134133            return true;
    135134        }
    136         psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     135        psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    137136                   PS_ERRORTEXT_psLogMsg_DEST_LOCATION_INVALID,
    138137                   location);
     
    142141
    143142        if (file == NULL) {
    144             psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_IO,
     143            psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_IO,
    145144                       PS_ERRORTEXT_psLogMsg_OPEN_FILE_FAILED,
    146145                       location);
     
    154153    }
    155154
    156     psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     155    psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    157156               PS_ERRORTEXT_psLogMsg_UNSUPPORTED_PROTOCOL,
    158157               protocol);
     
    218217            break;
    219218        default:
    220             psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
     219            psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
    221220                       PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);
    222221            break;
     
    333332            *head_ptr++ = '|';
    334333        }
    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
    336340        head_ptr += strlen(head_ptr);
    337341    }
Note: See TracChangeset for help on using the changeset viewer.