IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2005, 3:33:12 PM (21 years ago)
Author:
drobbin
Message:

Fixed psTrace to allow levels of 10 and higher

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psTrace.c

    r5112 r5118  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-09-23 21:57:12 $
     11 *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-09-24 01:33:12 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    216216            if (pname == NULL) {
    217217                // This is the final component to add.
    218                 currentNode->subcomp[(currentNode->n) - 1] = componentAlloc(firstComponent, level);
     218                currentNode->subcomp[(currentNode->n) - 1] =
     219                    componentAlloc(firstComponent, level);
    219220            } else {
    220221                // We are adding an intermediate component.  The trace level
     
    224225                // static, one-time, type of behavior.
    225226
    226                 currentNode->subcomp[(currentNode->n) - 1] = componentAlloc(firstComponent, PS_DEFAULT_TRACE_LEVEL);
     227                currentNode->subcomp[(currentNode->n) - 1] =
     228                    componentAlloc(firstComponent, PS_DEFAULT_TRACE_LEVEL);
    227229            }
    228230            currentNode = currentNode->subcomp[(currentNode->n) - 1];
     
    514516        gethostname(hostname, 256);
    515517    }
    516     switch (level) {
    517     case PS_LOG_ABORT:
     518
     519    if (level == PS_LOG_ABORT) {
    518520        clevel = 'A';
    519         break;
    520 
    521     case PS_LOG_ERROR:
     521    } else if (level == PS_LOG_ERROR) {
    522522        clevel = 'E';
    523         break;
    524 
    525     case PS_LOG_WARN:
     523    } else if (level == PS_LOG_WARN) {
    526524        clevel = 'W';
    527         break;
    528 
    529     case PS_LOG_INFO:
     525    } else if (level == PS_LOG_INFO) {
    530526        clevel = 'I';
    531         break;
    532 
    533     case 4:
    534     case 5:
    535     case 6:
    536     case 7:
    537     case 8:
    538     case 9:
     527    } else if (level >= 4) {
    539528        clevel = level + '0';
    540         break;
    541 
    542     default:
     529    } else {
    543530        psTrace("utils.logMsg", 2, "Invalid logMsg level: %d (%s)\n", level, format);
    544531        level = (level < 0) ? 0 : 9;
    545532        clevel = level + '0';
    546         break;
    547533    }
    548534
     
    772758    // XXX: If one must at least log error messages, why don't we set logMsg = true here?
    773759    if (!traceMsg) {
    774         psTrace("utils.traceMsg", 1, "You must at least trace error messages (You chose \"%s\")", format);
     760        psTrace("utils.traceMsg", 1,
     761                "You must at least trace error messages (You chose \"%s\")", format);
    775762
    776763    }
Note: See TracChangeset for help on using the changeset viewer.