00001 #ifndef _ACS_LOG_SVC_IMPL_H_
00002 #define _ACS_LOG_SVC_IMPL_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
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
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
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
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
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
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
00114
00115 void logError (const ACSErr::ErrorTrace &c
00116 );
00117
00118
00119
00120
00121 void logErrorWithPriority (const ACSErr::ErrorTrace &c,
00122 ACSLog::Priorities p
00123 );
00124
00125
00126
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
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
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
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
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
00185
00186 void logXML (const char * xml
00187 );
00188
00189
00190
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