IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2007, 3:59:28 PM (19 years ago)
Author:
jhoblitt
Message:

./sys header file cleanup:

formatting/whitespace fixes
add a few additional gcc attributes
mark p_psFileLine as deprecated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psLogMsg.h

    r11248 r11694  
    99 *  @author Robert Lupton, Princeton University
    1010 *  @author GLG, MHPCC
     11 *  @author Joshua Hoblitt, University of Hawaii
    1112 *
    12  *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2007-01-23 22:47:23 $
     13 *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-02-08 01:59:28 $
    1415 *
    1516 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2526#include "psType.h"
    2627
     28
     29///< Status codes for log messages
     30enum {
     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
     41enum {
     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
    2747/** This procedure sets the destination for future log messages.
    2848 *
     
    3656);
    3757
     58
    3859/** 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.
    4062 *
    4163 *  @return int:        The current file descriptor.
    4264 */
    4365int psLogGetDestination();
     66
    4467
    4568/** This procedure sets the message level for future log messages.  Subsequent
     
    5477    int level                          ///< Specifies the system log level
    5578);
     79
    5680
    5781/** This procedures returns the current log message level.
     
    7498);
    7599
     100
    76101/** This procedures uses a string to set the destination for which to send
    77102 *  the corresponding log messages.
     
    83108);
    84109
     110
    85111/** This procedure logs a message to the destination set by a prior
    86112 *  call to psLogSetDestination(), if myLevel is less than the level
     
    89115 *
    90116 */
    91 #ifdef __GNUC__
    92117void psLogMsg(
    93118    const char *name,                  ///< name of the log source
     
    95120    const char *format,                ///< printf-style format command
    96121    ...
     122#ifdef __GNUC__
    97123) __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__
    104125);
    105 #endif // __GNUC__
     126#endif // ifdef __GNUC__
    106127
    107 #ifndef SWIG
     128
    108129/** This procedure is functionally equivalent to psLogMsg(), except that
    109130 *  it takes a va_list as the message parameter, not a printf-style string.
    110131 *
    111132 */
     133#ifndef SWIG
    112134void psLogMsgV(
    113135    const char *name,                  ///< name of the log source
     
    118140#endif // #ifndef SWIG
    119141
    120 ///< Status codes for log messages
    121 enum {
    122     PS_LOG_ABORT = 0,                  ///< log message is a critical error, perform an abort after printing
    123     PS_LOG_ERROR,                      ///< log message is an error, but don't abort
    124     PS_LOG_WARN,                       ///< log message is a warning
    125     PS_LOG_INFO,                       ///< log message is informational only
    126     PS_LOG_DETAIL,                     ///< log message provides details of minor interest
    127     PS_LOG_MINUTIA,                    ///< log message provides very detailed information
    128 };
    129 
    130 ///< Destinations for log messages
    131 enum {
    132     PS_LOG_TO_NONE = 0,                ///< turn off logging
    133     PS_LOG_TO_STDERR = 1,              ///< log to system's stderr
    134     PS_LOG_TO_STDOUT = 2               ///< log to system's stdout
    135 };
    136142
    137143/// @}
Note: See TracChangeset for help on using the changeset viewer.