IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1733


Ignore:
Timestamp:
Sep 8, 2004, 12:10:06 PM (22 years ago)
Author:
desonia
Message:

fixed bug where psTracePrintLevels didn't honor the destination set by psTraceSetDestination.

Location:
trunk/psLib/src
Files:
4 edited

Legend:

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

    r1731 r1733  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 21:22:47 $
     11 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 22:10:06 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    134134void psTraceReset()
    135135{
    136     componentFree(cRoot);
     136    psFree(cRoot);
    137137    cRoot = NULL;
    138138}
     
    354354    } else {
    355355        if (comp->level == PS_DEFAULT_TRACE_LEVEL) {
    356             printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
    357                    defLevel);
     356            if (traceFP == NULL) {
     357                printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     358                       defLevel);
     359            } else {
     360                fprintf(traceFP,"%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     361                        defLevel);
     362            }
    358363        } else {
    359             printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
    360                    comp->level);
     364            if (traceFP == NULL) {
     365                printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     366                       comp->level);
     367            } else {
     368                fprintf(traceFP, "%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     369                        comp->level);
     370            }
    361371        }
    362372    }
  • trunk/psLib/src/sys/psTrace.h

    r1731 r1733  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 21:22:47 $
     11 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 22:10:06 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1818
    1919#define PS_UNKNOWN_TRACE_LEVEL -9999   // we don't know this name's level
    20 #define PS_DEFAULT_TRACE_LEVEL -1
     20#define PS_DEFAULT_TRACE_LEVEL 0
    2121
    2222/** \addtogroup LogTrace
  • trunk/psLib/src/sysUtils/psTrace.c

    r1731 r1733  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 21:22:47 $
     11 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 22:10:06 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    134134void psTraceReset()
    135135{
    136     componentFree(cRoot);
     136    psFree(cRoot);
    137137    cRoot = NULL;
    138138}
     
    354354    } else {
    355355        if (comp->level == PS_DEFAULT_TRACE_LEVEL) {
    356             printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
    357                    defLevel);
     356            if (traceFP == NULL) {
     357                printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     358                       defLevel);
     359            } else {
     360                fprintf(traceFP,"%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     361                        defLevel);
     362            }
    358363        } else {
    359             printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
    360                    comp->level);
     364            if (traceFP == NULL) {
     365                printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     366                       comp->level);
     367            } else {
     368                fprintf(traceFP, "%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
     369                        comp->level);
     370            }
    361371        }
    362372    }
  • trunk/psLib/src/sysUtils/psTrace.h

    r1731 r1733  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 21:22:47 $
     11 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 22:10:06 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1818
    1919#define PS_UNKNOWN_TRACE_LEVEL -9999   // we don't know this name's level
    20 #define PS_DEFAULT_TRACE_LEVEL -1
     20#define PS_DEFAULT_TRACE_LEVEL 0
    2121
    2222/** \addtogroup LogTrace
Note: See TracChangeset for help on using the changeset viewer.