• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acslogSvcImpl.h

Go to the documentation of this file.
00001 #ifndef _ACS_LOG_SVC_IMPL_H_
00002 #define _ACS_LOG_SVC_IMPL_H_
00003 /*******************************************************************************
00004 *    ALMA - Atacama Large Millimiter Array
00005 *    (c) European Southern Observatory, 2002
00006 *    Copyright by ESO (in the framework of the ALMA collaboration)
00007 *    and Cosylab 2002, All rights reserved
00008 *
00009 *    This library is free software; you can redistribute it and/or
00010 *    modify it under the terms of the GNU Lesser General Public
00011 *    License as published by the Free Software Foundation; either
00012 *    version 2.1 of the License, or (at your option) any later version.
00013 *
00014 *    This library is distributed in the hope that it will be useful,
00015 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 *    Lesser General Public License for more details.
00018 *
00019 *    You should have received a copy of the GNU Lesser General Public
00020 *    License along with this library; if not, write to the Free Software
00021 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00022 *
00023 * "@(#) $Id: acslogSvcImpl.h,v 1.19 2010/03/26 23:28:15 javarias Exp $"
00024 *
00025 * who       when      what
00026 * --------  --------  ----------------------------------------------
00027 * bjeram 2001-09-11 created 
00028 */
00029 
00030 #ifndef __cplusplus
00031 #error This is a C++ include file and cannot be used from plain C
00032 #endif
00033 
00034 #include <acscommonC.h>
00035 
00036 #include "acslogS.h"
00037 #include "logging.h"
00038 #include <loggingBaseLog.h>
00039 
00040 #include <acsutilPorts.h>
00041 
00042 typedef unsigned long PriorityFlag;
00043 
00044 class ACSLogImpl : public POA_ACSLog::LogSvc {
00045 public:
00046   ACSLogImpl(LoggingProxy &logProxy) : m_logProxy(logProxy){}
00047  
00048   /*
00049   * @throw ACSErr::ACSException
00050   */
00051   void logTrace (acscommon::TimeStamp time,
00052                  const char * msg,
00053                  const ACSLog::RTContext & rtCont,
00054                  const ACSLog::SourceInfo & srcInfo,
00055                  const ACSLog::NVPairSeq & data
00056                  );
00057 
00058   /*
00059   * @throw ACSErr::ACSException
00060   */
00061   void logDelouse (acscommon::TimeStamp time,
00062                  const char * msg,
00063                  const ACSLog::RTContext & rtCont,
00064                  const ACSLog::SourceInfo & srcInfo,
00065                  const ACSLog::NVPairSeq & data
00066                  
00067                  );
00068 
00069   /*
00070   * @throw ACSErr::ACSException
00071   */
00072   void logDebug (acscommon::TimeStamp time,
00073                  const char * msg,
00074                  const ACSLog::RTContext & rtCont,
00075                  const ACSLog::SourceInfo & srcInfo,
00076                  const ACSLog::NVPairSeq & data
00077                  
00078                  );
00079 
00080   /*
00081   * @throw ACSErr::ACSException
00082   */
00083   void logInfo (acscommon::TimeStamp time,
00084                  const char * msg,
00085                  const ACSLog::RTContext & rtCont,
00086                  const ACSLog::SourceInfo & srcInfo,
00087                  const ACSLog::NVPairSeq & data
00088                  
00089                  );
00090 
00091   /*
00092   * @throw ACSErr::ACSException
00093   */
00094   void logNotice (acscommon::TimeStamp time,
00095                  const char * msg,
00096                  const ACSLog::RTContext & rtCont,
00097                  const ACSLog::SourceInfo & srcInfo,
00098                  const ACSLog::NVPairSeq & data
00099                  
00100                  );
00101 
00102   /*
00103   * @throw ACSErr::ACSException
00104   */
00105   void logWarning (acscommon::TimeStamp time,
00106                  const char * msg,
00107                  const ACSLog::RTContext & rtCont,
00108                  const ACSLog::SourceInfo & srcInfo,
00109                  const ACSLog::NVPairSeq & data
00110                  );
00111 
00112   /*
00113   * @throw ACSErr::ACSException
00114   */
00115   void logError (const ACSErr::ErrorTrace &c
00116                  );
00117 
00118   /*
00119   * @throw ACSErr::ACSException
00120   */
00121   void logErrorWithPriority (const ACSErr::ErrorTrace &c,
00122                             ACSLog::Priorities p
00123                  );
00124 
00125   /*
00126   * @throw ACSErr::ACSException
00127   */
00128   void logWithPriority (ACSLog::Priorities p,
00129                               acscommon::TimeStamp time,
00130                               const char * msg,
00131                               const ACSLog::RTContext & rtCont,
00132                               const ACSLog::SourceInfo & srcInfo,
00133                               const ACSLog::NVPairSeq & data,
00134                               const char * audience=NULL,
00135                               const char * array=NULL,
00136                               const char * antenna=NULL
00137                  );
00138  
00139   /*
00140   * @throw ACSErr::ACSException
00141   */
00142   void logWithAudience (ACSLog::Priorities p,
00143                               acscommon::TimeStamp time,
00144                               const char * msg,
00145                               const ACSLog::RTContext & rtCont,
00146                               const ACSLog::SourceInfo & srcInfo,
00147                               const char * audience=NULL,
00148                               const char * array=NULL,
00149                               const char * antenna=NULL
00150                  );
00151  
00152   /*
00153   * @throw ACSErr::ACSException
00154   */
00155   void logCritical (acscommon::TimeStamp time,
00156                  const char * msg,
00157                  const ACSLog::RTContext & rtCont,
00158                  const ACSLog::SourceInfo & srcInfo,
00159                  const ACSLog::NVPairSeq & data
00160                  );
00161 
00162   /*
00163   * @throw ACSErr::ACSException
00164   */
00165   void logAlert (acscommon::TimeStamp time,
00166                  const char * msg,
00167                  const ACSLog::RTContext & rtCont,
00168                  const ACSLog::SourceInfo & srcInfo,
00169                  const ACSLog::NVPairSeq & data
00170                  );
00171 
00172   /*
00173   * @throw ACSErr::ACSException
00174   */
00175   void logEmergency (acscommon::TimeStamp time,
00176                  const char * msg,
00177                  const ACSLog::RTContext & rtCont,
00178                  const ACSLog::SourceInfo & srcInfo,
00179                  const ACSLog::NVPairSeq & data
00180                  );
00181 
00182 
00183   /*
00184   * @throw ACSErr::ACSException
00185   */
00186   void logXML (const char * xml
00187                  );
00188     
00189   /*
00190   * @throw ACSErr::ACSException
00191   */
00192   void logXMLTimed (acscommon::TimeStamp time,
00193                     const char * xml
00194                  );
00195 private:
00196   bool checkRTContext (const ACSLog::RTContext & rtCont);
00197   bool checkSourceInfo (const ACSLog::SourceInfo & srcInfo);
00198   PriorityFlag writeRTContext (const ACSLog::RTContext & rtCont);
00199   PriorityFlag writeSourceInfo (const ACSLog::SourceInfo & srcInfo);
00200   unsigned int writeData (const ACSLog::NVPairSeq & data);
00201   PriorityFlag write(const ACSLog::RTContext & rtCont,
00202                     const ACSLog::SourceInfo & srcInfo,
00203                     const ACSLog::NVPairSeq & data);
00204   LoggingProxy &m_logProxy;
00205 };
00206 
00207 
00208 
00209 #endif
00210 
00211 
00212 
00213 
00214 

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0