Changeset 11694 for trunk/psLib/src/sys/psLogMsg.h
- Timestamp:
- Feb 7, 2007, 3:59:28 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psLogMsg.h (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psLogMsg.h
r11248 r11694 9 9 * @author Robert Lupton, Princeton University 10 10 * @author GLG, MHPCC 11 * @author Joshua Hoblitt, University of Hawaii 11 12 * 12 * @version $Revision: 1.3 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2007-0 1-23 22:47:23$13 * @version $Revision: 1.39 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2007-02-08 01:59:28 $ 14 15 * 15 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 25 26 #include "psType.h" 26 27 28 29 ///< Status codes for log messages 30 enum { 31 PS_LOG_ABORT = 0, ///< log message is a critical error, perform an abort after printing 32 PS_LOG_ERROR, ///< log message is an error, but don't abort 33 PS_LOG_WARN, ///< log message is a warning 34 PS_LOG_INFO, ///< log message is informational only 35 PS_LOG_DETAIL, ///< log message provides details of minor interest 36 PS_LOG_MINUTIA, ///< log message provides very detailed information 37 }; 38 39 40 ///< Destinations for log messages 41 enum { 42 PS_LOG_TO_NONE = 0, ///< turn off logging 43 PS_LOG_TO_STDERR = 1, ///< log to system's stderr 44 PS_LOG_TO_STDOUT = 2 ///< log to system's stdout 45 }; 46 27 47 /** This procedure sets the destination for future log messages. 28 48 * … … 36 56 ); 37 57 58 38 59 /** This procedure returns the current log destination file descriptor. If the 39 * destination has not been defined by the use, the descriptor for stdout is returned. 60 * destination has not been defined by the use, the descriptor for stdout is 61 * returned. 40 62 * 41 63 * @return int: The current file descriptor. 42 64 */ 43 65 int psLogGetDestination(); 66 44 67 45 68 /** This procedure sets the message level for future log messages. Subsequent … … 54 77 int level ///< Specifies the system log level 55 78 ); 79 56 80 57 81 /** This procedures returns the current log message level. … … 74 98 ); 75 99 100 76 101 /** This procedures uses a string to set the destination for which to send 77 102 * the corresponding log messages. … … 83 108 ); 84 109 110 85 111 /** This procedure logs a message to the destination set by a prior 86 112 * call to psLogSetDestination(), if myLevel is less than the level … … 89 115 * 90 116 */ 91 #ifdef __GNUC__92 117 void psLogMsg( 93 118 const char *name, ///< name of the log source … … 95 120 const char *format, ///< printf-style format command 96 121 ... 122 #ifdef __GNUC__ 97 123 ) __attribute__((format(printf, 3, 4))); 98 #else // __GNUC__ 99 void psLogMsg( 100 const char *name, ///< name of the log source 101 int level, ///< severity level of this log message 102 const char *format, ///< printf-style format command 103 ... 124 #else // ifdef __GNUC__ 104 125 ); 105 #endif // __GNUC__126 #endif // ifdef __GNUC__ 106 127 107 #ifndef SWIG 128 108 129 /** This procedure is functionally equivalent to psLogMsg(), except that 109 130 * it takes a va_list as the message parameter, not a printf-style string. 110 131 * 111 132 */ 133 #ifndef SWIG 112 134 void psLogMsgV( 113 135 const char *name, ///< name of the log source … … 118 140 #endif // #ifndef SWIG 119 141 120 ///< Status codes for log messages121 enum {122 PS_LOG_ABORT = 0, ///< log message is a critical error, perform an abort after printing123 PS_LOG_ERROR, ///< log message is an error, but don't abort124 PS_LOG_WARN, ///< log message is a warning125 PS_LOG_INFO, ///< log message is informational only126 PS_LOG_DETAIL, ///< log message provides details of minor interest127 PS_LOG_MINUTIA, ///< log message provides very detailed information128 };129 130 ///< Destinations for log messages131 enum {132 PS_LOG_TO_NONE = 0, ///< turn off logging133 PS_LOG_TO_STDERR = 1, ///< log to system's stderr134 PS_LOG_TO_STDOUT = 2 ///< log to system's stdout135 };136 142 137 143 /// @}
Note:
See TracChangeset
for help on using the changeset viewer.
