11 #ifndef TX_EVENT_LOG_FILE_H
12 #define TX_EVENT_LOG_FILE_H
14 #include "TxEventLog.h"
19 #include <sys/types.h>
27 #include "TxUCMUtils.h"
38 virtual void writeDown(
const std::string& message);
39 virtual void writeDown(
const char *message);
107 virtual void setContext (
const std::string& context);
113 virtual void logStart (
const std::string& key,
const std::string& value);
124 virtual void logJobAttribute (
const std::string& key,
const std::string& value);
133 virtual void setJobSubmitLocation (
const std::string& url);
142 virtual void setJobSubmitState (State state);
151 virtual void logTask (
unsigned int size=1);
165 virtual void logTask (
const std::string& taskAttributes);
175 virtual void setJobSubmitID (
const std::string& ID);
187 virtual void logEvent (
const std::string& logMsg,
188 Level level = LEVEL_INFO,
189 Stage stage = STATUS,
190 const std::string& msgContext = TxUCMConstants::defaultContext);
203 virtual void logEvent (
const std::string& userKey,
204 const std::string& userValue,
205 Level level = LEVEL_INFO,
206 Stage stage = STATUS,
207 const std::string& msgContext = TxUCMConstants::defaultContext);
213 virtual void logEnd (
const std::string& key,
214 const std::string& value);
220 virtual void readProperties ();
230 const char* createHeader ();
235 void writeMessage (
const std::string& event,
236 const std::string& context,
239 const std::string& key,
240 const std::string& value);
242 std::string brokerJobID, brokerTaskID, requester, context;
243 std::map <std::string, std::string> ucmLogProps;
244 std::string timestamp, logFilePath;
245 std::string username, hostname;
246 bool startMsgWritten;
251 virtual StUcmTasks *getTaskList (
int limit,
int offset);
256 virtual StUcmJobs *getJobList(
int limit);
257 virtual StUcmJobs *getJobList(
int limit,
int offset);
259 virtual int getJobId(
const char *reqName,
const char *taskBrokerId,
int jobBrokerId);
265 virtual StUcmEvents *getEventList(
int limit,
int offset);
268 virtual void setDbJobID (
int bJobID);
270 virtual int queryTableSize(
const char *tableName);
271 virtual int queryTableSize(
const char *tableName,
const char *where);
272 virtual int queryTableSize(
const char *tableName,
const StRecord *where);
virtual void logJobSubmitLocation(const std::string &url)
virtual void logJobSubmitID(const std::string &ID)
virtual void logStart(const std::string &key, const std::string &value)
virtual void logEnd(const std::string &key, const std::string &value)
virtual void logEvent(const std::string &logMsg, Level level=LEVEL_INFO, Stage stage=STATUS, const std::string &msgContext=TxUCMConstants::defaultContext)
virtual void setEnvBrokerTaskID(const std::string &envBrokerTaskID)
virtual void setEnvBrokerJobID(const std::string &envBrokerJobID)
virtual void logJobAttribute(const std::string &key, const std::string &value)
virtual void setRequesterName(const std::string &requester)
virtual void setBrokerJobID(int brokerJobID)
virtual void writeDown(const std::string &message)
virtual void logTask(unsigned int size=1)
virtual ~TxEventLogFile()
virtual void setContext(const std::string &context)
virtual void logJobSubmitState(State state)
virtual void setBrokerTaskID(const std::string &brokerTaskID)