Changeset 3781 for trunk/psLib/src/sysUtils/psTrace.h
- Timestamp:
- Apr 28, 2005, 1:46:29 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sysUtils/psTrace.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psTrace.h
r3264 r3781 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 2-17 19:26:24$11 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-28 23:46:29 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 29 29 //#define PS_NO_TRACE 1 ///< to turn off all tracing 30 30 31 #if defined(PS_NO_TRACE) 32 # define psTrace(facil, level, ...) (void)0 33 /* do nothing */ 34 # define p_psTrace(facil, level, ...) (void)0 35 /* do nothing */ 36 # define psTraceSetLevel(facil,level) 0 37 # define psTraceGetLevel(facil) 0 38 # define psTraceReset() (void)0 /* do nothing */ 39 # define psTraceFree() (void)0 /* do nothing */ 40 # define psTracePrintLevels() (void)0 41 /* do nothing */ 42 # define psTraceSetDestination(fp) (void)0 43 /* do nothing */ 44 # else 31 // XXX EAM : the old 'empty' values of (void) 0 are dangerous 32 # if defined(PS_NO_TRACE) 33 # define psTrace(facil, level, ...) /* do nothing */ 34 # define p_psTrace(facil, level, ...) /* do nothing */ 35 # define psTraceSetLevel(facil,level) /* do nothing */ 36 # define psTraceGetLevel(facil) /* do nothing */ 37 # define psTraceReset() /* do nothing */ 38 # define psTraceFree() /* do nothing */ 39 # define psTracePrintLevels() /* do nothing */ 40 # define psTraceSetDestination(fp) /* do nothing */ 41 # define psTraceSetDestination() /* do nothing */ 42 # define PS_TRACE_ON 0 45 43 46 /** Basic structure for the component tree. A component is a string of the 47 form aaa.bbb.ccc, and may itself contain further subcomponents. The 48 Component structure doesn't in fact contain it's full name, but only the 49 last part. */ 50 typedef struct p_psComponent 51 { 52 const char *name; // last part of name of component 53 psS32 level; // trace level for this component 54 bool p_psSpecified; 55 psS32 n; // number of subcomponents 56 struct p_psComponent* *subcomp; // next level of subcomponents 57 } 44 # else /* PS_NO_TRACE */ 45 # define PS_TRACE_ON 1 46 47 /** Basic structure for the component tree. A component is a string of the 48 form aaa.bbb.ccc, and may itself contain further subcomponents. The 49 Component structure doesn't in fact contain it's full name, but only the 50 last part. */ 51 typedef struct p_psComponent 52 { 53 const char *name; // last part of name of component 54 psS32 level; // trace level for this component 55 bool p_psSpecified; 56 psS32 n; // number of subcomponents 57 struct p_psComponent* *subcomp; // next level of subcomponents 58 } 58 59 p_psComponent; 59 60 … … 72 73 #ifndef SWIG 73 74 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__) 74 #endif 75 #endif /* SWIG */ 75 76 76 #endif 77 #endif /* DOXYGEN */ 77 78 78 79 /// Set trace level … … 82 83 83 84 /// Get the trace level 84 psS32 psTraceGetLevel(const char *facil) ///< facilty of interest85 psS32 psTraceGetLevel(const char *facil) ///< facilty of interest 85 86 ; 86 87 … … 94 95 void psTraceSetDestination(FILE * fp); 95 96 97 /// Get the current destination for trace messages. 98 FILE *psTraceGetDestination(void); 99 96 100 /* \} */// End of SystemGroup Functions 97 101 98 #endif 102 #endif /* PS_NO_TRACE */ 99 103 100 #endif 104 #endif /* PS_TRACE_H */ 105
Note:
See TracChangeset
for help on using the changeset viewer.
