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
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
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
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
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
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
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
00102
00103
void logError (
const ACSErr::ErrorTrace &c
00104 );
00105
00106
00107
00108
00109
void logErrorWithPriority (
const ACSErr::ErrorTrace &c,
00110 ACSLog::Priorities p
00111 );
00112
00113
00114
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
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
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
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
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
00173
00174
void logXML (
const char * xml
00175 );
00176
00177
00178
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