IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5072 for trunk/psLib/src/sys


Ignore:
Timestamp:
Sep 19, 2005, 4:43:53 PM (21 years ago)
Author:
drobbin
Message:

added psLogGet fxns and updated spline functions for unsigned int compatability

Location:
trunk/psLib/src/sys
Files:
2 edited

Legend:

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

    r4979 r5072  
    1212 *  @author GLG, MHPCC
    1313 *
    14  *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-09-09 01:11:22 $
     14 *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-09-20 02:43:53 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151
    5252static FILE *logDest = (FILE *) 1;      // flag to initialize to stderr before using.
     53static int logFD = 0;
    5354static psS32 globalLogLevel = PS_LOG_INFO;        // log all messages at this or above
    5455static psBool logTime = true;     // Flag to include time info
     
    8182}
    8283
     84int psLogGetLevel()
     85{
     86    return (globalLogLevel);
     87}
     88
    8389/*****************************************************************************
    8490psLogSetDestination(): sets the log message destination.
     
    94100    if (logDest == (FILE *) 1) {
    95101        logDest = stderr;
     102        logFD = 2;
    96103    }
    97104    if (fd == -1)
     
    104111        }
    105112        logDest = stdout;
     113        logFD = 1;
    106114    } else if (fd == 2) {
    107115        //        fp = stderr;
     
    110118        }
    111119        logDest = stderr;
     120        logFD = 2;
    112121    } else if (fd == 0) {
    113122        //        fp = NULL;
     
    116125        }
    117126        logDest = NULL;
     127        logFD = 0;
    118128        //        return true;
    119129    } else if (fd > 2) {
     
    123133        fp = fdopen(fd, "w");
    124134        logDest = fp;
     135        logFD = fd;
    125136        //        fclose(fp);
    126137        //        return true;
     
    130141
    131142}
     143
     144int psLogGetDestination(void)
     145{
     146    if (logDest == (FILE *) 1) {
     147        logFD = 1;
     148    }
     149    return (logFD);
     150}
     151
    132152
    133153/*****************************************************************************
  • trunk/psLib/src/sys/psLogMsg.h

    r5057 r5072  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-09-15 21:22:22 $
     13 *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-09-20 02:43:53 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3636);
    3737
     38/** 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.
     40 *
     41 *  @return int:        The current file descriptor.
     42 */
     43int psLogGetDestination();
     44
    3845/** This procedure sets the message level for future log messages.  Subsequent
    3946 *  log messages, with a log level of "mylevel", will only be logged if
     
    4249 *  be displayed.  The old log level will be returned.
    4350 *
    44  *  @return int    old logging level
     51 *  @return int:        old logging level.
    4552 */
    4653int psLogSetLevel(
    4754    int level                          ///< Specifies the system log level
    4855);
     56
     57/** This procedures returns the current log message level.
     58 *
     59 *  @return int:        The current logging level.
     60 */
     61int psLogGetLevel();
    4962
    5063/** This procedure sets the log format for future log messages.  The argument
Note: See TracChangeset for help on using the changeset viewer.