Changeset 3476 for trunk/psLib/src/sysUtils
- Timestamp:
- Mar 22, 2005, 11:52:49 AM (21 years ago)
- Location:
- trunk/psLib/src/sysUtils
- Files:
-
- 4 edited
-
psError.c (modified) (2 diffs)
-
psError.h (modified) (4 diffs)
-
psLogMsg.c (modified) (2 diffs)
-
psLogMsg.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psError.c
r3264 r3476 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 2-17 19:26:24$12 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-03-22 21:52:49 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 103 103 104 104 return code; 105 } 106 107 void 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; 105 128 } 106 129 -
trunk/psLib/src/sysUtils/psError.h
r3264 r3476 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 2-17 19:26:24$14 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-22 21:52:49 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 106 106 #endif 107 107 108 #ifdef DOXYGEN 108 109 /** Reports an error message to the logging facility 109 110 * … … 116 117 * @return psErrorCode the given error code 117 118 */ 118 #ifdef DOXYGEN119 119 psErrorCode psError( 120 120 psErrorCode code, ///< Error class code 121 121 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 */ 133 void psWarning( 122 134 const char* fmt, 123 135 ... … … 133 145 ... 134 146 ); 147 void p_psWarning( 148 const char* file, 149 int lineno, 150 const char* func, 151 const char* fmt, 152 ... 153 ); 154 135 155 136 156 #ifndef SWIG 137 157 #define psError(code,new,...) p_psError(__FILE__,__LINE__,__func__,code,new,__VA_ARGS__) 158 #define psWarning(...) p_psWarning(__FILE__,__LINE__,__func__,__VA_ARGS__) 138 159 #endif 139 160 -
trunk/psLib/src/sysUtils/psLogMsg.c
r3264 r3476 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.3 8$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 2-17 19:26:24$13 * @version $Revision: 1.39 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-03-22 21:52:49 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 383 383 va_end(ap); 384 384 } 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 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 2-17 19:26:24$13 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-03-22 21:52:49 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 102 102 }; 103 103 104 /** Logs a warning message.105 *106 * This procedure logs a message to the destination set by a prior107 * call to psLogSetDestination(), This is equivalent to calling108 * psLogMsg with a level of PS_LOG_WARN.109 *110 */111 void psWarning(112 const char* name,113 const char* fmt,114 ...115 );116 117 104 /// @} 118 105
Note:
See TracChangeset
for help on using the changeset viewer.
