IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 4:01:02 PM (20 years ago)
Author:
jhoblitt
Message:

change psTrace() to include FILE, LINE, & func
change p_psTrace() to accept file, line, & function arguments
change p_psTrace() to concatenate the calling function name to the end of the facility name

File:
1 edited

Legend:

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

    r8232 r8244  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-08-08 23:32:23 $
     11 *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-08-09 02:01:02 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    615615 null
    616616 *****************************************************************************/
    617 void p_psTrace(const char *comp,        // component being traced
    618                int level,               // desired trace level
    619                const char *format,
    620                ...)                     // arguments
    621 {
     617void p_psTrace(
     618    const char* file,                  ///< file name
     619    int lineno,                        ///< line number in file
     620    const char* func,                  ///< function name
     621    const char *facil,                 ///< facilty of interest
     622    psS32 level,                       ///< desired trace level
     623    const char *format,                ///< printf-style format command
     624    ...                                ///< trace message arguments
     625)
     626{
     627    // XXX file & lineo are currently unused
    622628    va_list ap;
    623629    va_start(ap, format);
    624630    //    format = va_arg(ap, char *);
    625     psTraceV(comp, level, format, ap);
     631    psString fullFacil = NULL;
     632    psStringAppend(&fullFacil, "%s.%s", facil, func);
     633    psTraceV(fullFacil, level, format, ap);
     634    psFree(fullFacil);
    626635    va_end(ap);
    627636    // fflush(traceFP);
Note: See TracChangeset for help on using the changeset viewer.