IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 22, 2005, 11:52:49 AM (21 years ago)
Author:
desonia
Message:

* empty log message *

Location:
trunk/psLib/src/sysUtils
Files:
4 edited

Legend:

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

    r3264 r3476  
    1010 *  @author Eric Van Alst, MHPCC
    1111 *
    12  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-02-17 19:26:24 $
     12 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-03-22 21:52:49 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    103103
    104104    return code;
     105}
     106
     107void p_psWarning(const char* file,
     108                 int lineno,
     109                 const char* func,
     110                 const char* fmt,
     111                 ...)
     112{
     113    char msgName[1024];
     114
     115    snprintf(msgName,1024,"%s (%s:%d)",func,file,lineno);
     116
     117    va_list argPtr;             // variable list argument pointer
     118
     119    // Get the variable list parameters to pass to logging function
     120    va_start(argPtr, fmt);
     121
     122    psLogMsgV(msgName, PS_LOG_WARN, fmt, argPtr);
     123
     124    // Clean up stack after variable argument has been used
     125    va_end(argPtr);
     126
     127    return;
    105128}
    106129
  • trunk/psLib/src/sysUtils/psError.h

    r3264 r3476  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-02-17 19:26:24 $
     14 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-03-22 21:52:49 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    106106#endif
    107107
     108#ifdef DOXYGEN
    108109/** Reports an error message to the logging facility
    109110 *
     
    116117 *  @return psErrorCode    the given error code
    117118 */
    118 #ifdef DOXYGEN
    119119psErrorCode psError(
    120120    psErrorCode code,                  ///< Error class code
    121121    psBool new,                        ///< true if error originates at this location
     122    const char* fmt,
     123    ...
     124);
     125
     126/** Logs a warning message.
     127 *
     128 *  This procedure logs a message to the destination set by a prior
     129 *  call to psLogSetDestination(), This is equivalent to calling
     130 *  psLogMsg with a level of PS_LOG_WARN.
     131 *
     132 */
     133void psWarning(
    122134    const char* fmt,
    123135    ...
     
    133145    ...
    134146);
     147void p_psWarning(
     148    const char* file,
     149    int lineno,
     150    const char* func,
     151    const char* fmt,
     152    ...
     153);
     154
    135155
    136156#ifndef SWIG
    137157#define psError(code,new,...) p_psError(__FILE__,__LINE__,__func__,code,new,__VA_ARGS__)
     158#define psWarning(...) p_psWarning(__FILE__,__LINE__,__func__,__VA_ARGS__)
    138159#endif
    139160
  • trunk/psLib/src/sysUtils/psLogMsg.c

    r3264 r3476  
    1111 *  @author George Gusciora, MHPCC
    1212 *
    13  *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-02-17 19:26:24 $
     13 *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-03-22 21:52:49 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    383383    va_end(ap);
    384384}
    385 void psWarning(const char* name, const char* fmt, ...)
    386 {
    387     va_list ap;
    388 
    389     va_start(ap, fmt);
    390     psLogMsgV(name, PS_LOG_WARN, fmt, ap);
    391     va_end(ap);
    392 }
  • trunk/psLib/src/sysUtils/psLogMsg.h

    r3264 r3476  
    1111 *  @author George Gusciora, MHPCC
    1212 *
    13  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-02-17 19:26:24 $
     13 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-03-22 21:52:49 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    102102};
    103103
    104 /** Logs a warning message.
    105  *
    106  *  This procedure logs a message to the destination set by a prior
    107  *  call to psLogSetDestination(), This is equivalent to calling
    108  *  psLogMsg with a level of PS_LOG_WARN.
    109  *
    110  */
    111 void psWarning(
    112     const char* name,
    113     const char* fmt,
    114     ...
    115 );
    116 
    117104/// @}
    118105
Note: See TracChangeset for help on using the changeset viewer.