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

loggingLoggingProxyAppender.h

Go to the documentation of this file.
00001 /*
00002  * loggingLoggingProxyAppender.h
00003  *
00004  *  Created on: Jul 30, 2010
00005  *      Author: javarias
00006  */
00007 
00008 #ifndef LOGGINGLOGGINGPROXYAPPENDER_H_
00009 #define LOGGINGLOGGINGPROXYAPPENDER_H_
00010 
00011 #include <log4cpp/LayoutAppender.hh>
00012 #include <logging_idlC.h>
00013 
00014 namespace logging {
00015 
00016 class LoggingProxyAppender: public log4cpp::LayoutAppender {
00017 
00018 protected:
00019         virtual void _append(const LoggingEvent& event);
00020 
00021 public:
00022         LoggingProxyAppender();
00023         virtual ~LoggingProxyAppender();
00024 };
00025 
00026 
00027 class LoggingServiceFeeder {
00028 
00029 public:
00030 
00031         LoggingServiceFeeder();
00032 
00035         void sendLogRecord(Logging::XmlLogRecord logRecord);
00036 
00038         void sendLogRecordImmediately(Logging::XmlLogRecord logRecord);
00039 
00040         void setCentralizedLogger(Logging::AcsLogService_ptr centralizedLogger);
00041 
00042 private:
00043         Logging::AcsLogService_var m_logger;
00044         volatile bool shutdown;
00045 
00046         // Mutexes
00047         ACE_Recursive_Thread_Mutex m_mutex;
00048         ACE_SYNCH_MUTEX m_doWorkMutex;
00049 
00050         typedef std::deque<Logging::XmlLogRecord> LogDeque;
00051         LogDeque m_cache;
00052 
00053         void *worker(void *arg);
00054         void svc();
00055         void sendCache();
00056 };
00057 };
00058 ;
00059 
00060 #endif /* LOGGINGLOGGINGPROXYAPPENDER_H_ */

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