Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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.18 2008/10/01 04:41:17 cparedes 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 00039 #include <acsutilPorts.h> 00040 00041 typedef unsigned long PriorityFlag; 00042 00043 class ACSLogImpl : public POA_ACSLog::LogSvc { 00044 public: 00045 ACSLogImpl(LoggingProxy &logProxy) : m_logProxy(logProxy){} 00046 00047 /* 00048 * @throw ACSErr::ACSException 00049 */ 00050 void logTrace (acscommon::TimeStamp time, 00051 const char * msg, 00052 const ACSLog::RTContext & rtCont, 00053 const ACSLog::SourceInfo & srcInfo, 00054 const ACSLog::NVPairSeq & data 00055 ); 00056 00057 /* 00058 * @throw ACSErr::ACSException 00059 */ 00060 void logDebug (acscommon::TimeStamp time, 00061 const char * msg, 00062 const ACSLog::RTContext & rtCont, 00063 const ACSLog::SourceInfo & srcInfo, 00064 const ACSLog::NVPairSeq & data 00065 00066 ); 00067 00068 /* 00069 * @throw ACSErr::ACSException 00070 */ 00071 void logInfo (acscommon::TimeStamp time, 00072 const char * msg, 00073 const ACSLog::RTContext & rtCont, 00074 const ACSLog::SourceInfo & srcInfo, 00075 const ACSLog::NVPairSeq & data 00076 00077 ); 00078 00079 /* 00080 * @throw ACSErr::ACSException 00081 */ 00082 void logNotice (acscommon::TimeStamp time, 00083 const char * msg, 00084 const ACSLog::RTContext & rtCont, 00085 const ACSLog::SourceInfo & srcInfo, 00086 const ACSLog::NVPairSeq & data 00087 00088 ); 00089 00090 /* 00091 * @throw ACSErr::ACSException 00092 */ 00093 void logWarning (acscommon::TimeStamp time, 00094 const char * msg, 00095 const ACSLog::RTContext & rtCont, 00096 const ACSLog::SourceInfo & srcInfo, 00097 const ACSLog::NVPairSeq & data 00098 ); 00099 00100 /* 00101 * @throw ACSErr::ACSException 00102 */ 00103 void logError (const ACSErr::ErrorTrace &c 00104 ); 00105 00106 /* 00107 * @throw ACSErr::ACSException 00108 */ 00109 void logErrorWithPriority (const ACSErr::ErrorTrace &c, 00110 ACSLog::Priorities p 00111 ); 00112 00113 /* 00114 * @throw ACSErr::ACSException 00115 */ 00116 void logWithPriority (ACSLog::Priorities p, 00117 acscommon::TimeStamp time, 00118 const char * msg, 00119 const ACSLog::RTContext & rtCont, 00120 const ACSLog::SourceInfo & srcInfo, 00121 const ACSLog::NVPairSeq & data, 00122 const char * audience=NULL, 00123 const char * array=NULL, 00124 const char * antenna=NULL 00125 ); 00126 00127 /* 00128 * @throw ACSErr::ACSException 00129 */ 00130 void logWithAudience (ACSLog::Priorities p, 00131 acscommon::TimeStamp time, 00132 const char * msg, 00133 const ACSLog::RTContext & rtCont, 00134 const ACSLog::SourceInfo & srcInfo, 00135 const char * audience=NULL, 00136 const char * array=NULL, 00137 const char * antenna=NULL 00138 ); 00139 00140 /* 00141 * @throw ACSErr::ACSException 00142 */ 00143 void logCritical (acscommon::TimeStamp time, 00144 const char * msg, 00145 const ACSLog::RTContext & rtCont, 00146 const ACSLog::SourceInfo & srcInfo, 00147 const ACSLog::NVPairSeq & data 00148 ); 00149 00150 /* 00151 * @throw ACSErr::ACSException 00152 */ 00153 void logAlert (acscommon::TimeStamp time, 00154 const char * msg, 00155 const ACSLog::RTContext & rtCont, 00156 const ACSLog::SourceInfo & srcInfo, 00157 const ACSLog::NVPairSeq & data 00158 ); 00159 00160 /* 00161 * @throw ACSErr::ACSException 00162 */ 00163 void logEmergency (acscommon::TimeStamp time, 00164 const char * msg, 00165 const ACSLog::RTContext & rtCont, 00166 const ACSLog::SourceInfo & srcInfo, 00167 const ACSLog::NVPairSeq & data 00168 ); 00169 00170 00171 /* 00172 * @throw ACSErr::ACSException 00173 */ 00174 void logXML (const char * xml 00175 ); 00176 00177 /* 00178 * @throw ACSErr::ACSException 00179 */ 00180 void logXMLTimed (acscommon::TimeStamp time, 00181 const char * xml 00182 ); 00183 private: 00184 bool checkRTContext (const ACSLog::RTContext & rtCont); 00185 bool checkSourceInfo (const ACSLog::SourceInfo & srcInfo); 00186 PriorityFlag writeRTContext (const ACSLog::RTContext & rtCont); 00187 PriorityFlag writeSourceInfo (const ACSLog::SourceInfo & srcInfo); 00188 unsigned int writeData (const ACSLog::NVPairSeq & data); 00189 PriorityFlag write(const ACSLog::RTContext & rtCont, 00190 const ACSLog::SourceInfo & srcInfo, 00191 const ACSLog::NVPairSeq & data); 00192 LoggingProxy &m_logProxy; 00193 }; 00194 00195 00196 00197 #endif 00198 00199 00200 00201 00202

Generated on Thu Apr 30 02:30:49 2009 for ACS C++ API by doxygen 1.3.8