Changeset 11694 for trunk/psLib/src/sys/psTrace.h
- Timestamp:
- Feb 7, 2007, 3:59:28 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psTrace.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psTrace.h
r11449 r11694 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.5 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2007-0 1-31 00:38:46$11 * @version $Revision: 1.55 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-02-08 01:59:28 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 69 69 p_psComponent; 70 70 71 71 72 /** This procedure sets the trace format for future trace messages. The argument 72 73 * must be a character string consistsing of the letters H (host), L … … 82 83 ); 83 84 85 /** Sends a trace message. */ 84 86 #ifdef DOXYGEN 85 /** Sends a trace message. */86 87 void psTrace( 87 88 const char *facil, ///< facilty of interest … … 90 91 ... ///< trace message arguments 91 92 ); 92 93 /** Get the trace level 94 * 95 * @return int: Trace Level 96 */ 97 int psTraceGetLevel( 98 const char *facil ///< facilty of interest 99 ); 100 101 #else // DOXYGEN 102 #ifdef __GNUC__ 103 /// Send a trace message 93 #else // ifdef DOXYGEN 104 94 void p_psTrace( 105 95 const char* file, ///< file name … … 110 100 const char *format, ///< printf-style format command 111 101 ... ///< trace message arguments 102 #ifdef __GNUC__ 112 103 ) __attribute__((format(printf, 6, 7))); 113 #else // __GNUC__ 114 void p_psTrace( 115 const char* file, ///< file name 116 int lineno, ///< line number in file 117 const char* func, ///< function name 118 const char *facil, ///< facilty of interest 119 psS32 level, ///< desired trace level 120 const char *format, ///< printf-style format command 121 ... ///< trace message arguments 104 #else // ifdef __GNUC__ 122 105 ); 123 #endif // __GNUC__ 106 #endif // ifdef __GNUC__ 107 #ifndef SWIG 108 #define psTrace(facil, level, ...) \ 109 p_psTrace(__FILE__,__LINE__,__func__,facil, level, __VA_ARGS__) 110 #endif // ifndef SWIG 111 #endif // ifdef DOXYGEN 112 124 113 125 114 /** Get the trace level … … 127 116 * @return int: Trace Level 128 117 */ 118 #ifdef DOXYGEN 119 int psTraceGetLevel( 120 const char *facil ///< facilty of interest 121 ); 122 #else // ifdef DOXYGEN 129 123 int p_psTraceGetLevel( 130 124 const char* file, ///< file name … … 133 127 const char *facil ///< facilty of interest 134 128 ); 129 #ifndef SWIG 130 #define psTraceGetLevel(facil) \ 131 p_psTraceGetLevel(__FILE__,__LINE__,__func__,facil) 132 #endif // ifndef SWIG 133 #endif // ifdef DOXYGEN 135 134 136 #ifndef SWIG 137 #define psTrace(facil, level, ...) p_psTrace(__FILE__,__LINE__,__func__,facil, level, __VA_ARGS__) 138 #define psTraceGetLevel(facil) p_psTraceGetLevel(__FILE__,__LINE__,__func__,facil) 135 136 139 137 /** Sends a trace message. */ 140 138 void psTraceV( … … 144 142 va_list ap ///< varargs argument list 145 143 ); 146 #endif /* SWIG */ 147 #endif /* DOXYGEN */ 144 148 145 149 146 /** Set trace level … … 159 156 void psTraceReset(void); 160 157 158 161 159 /// print trace levels 162 160 void psTracePrintLevels(void); 161 163 162 164 163 /// Set the destination of future trace messages. … … 166 165 int fd ///< File descriptor 167 166 ); 167 168 168 169 169 /** Get the current destination for trace messages. … … 173 173 int psTraceGetDestination(void); 174 174 175 175 176 /// Return a psMetadata summarising the trace levels 176 177 psMetadata *psTraceLevels(void); 178 177 179 178 180 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
