00001 #ifndef BULKDATA_NT_DDS_LOGGABLE 00002 #define BULKDATA_NT_DDS_LOGGABLE 00003 00004 /******************************************************************************* 00005 * ALMA - Atacama Large Millimiter Array 00006 * (c) European Southern Observatory, 2011 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * "@(#) $Id: bulkDataNTDDSLoggable.h,v 1.2 2011/11/10 14:00:17 bjeram Exp $" 00023 * 00024 * who when what 00025 * -------- -------- ---------------------------------------------- 00026 * bjeram 2011-04-19 created 00027 */ 00028 00029 00030 #include <loggingLoggable.h> 00031 #include <logging.h> 00032 00040 class BulkDataNTDDSLoggable 00041 : public Logging::Loggable 00042 { 00043 public: 00044 //Constructor 00045 BulkDataNTDDSLoggable (const std::string &loggerName) : Logging::Loggable(loggerName), 00046 logger_mp(0), loggerInitCount_m(0){} 00047 00048 //destructor 00049 virtual ~BulkDataNTDDSLoggable (); 00050 00053 void initalizeLogging(); 00054 00056 virtual Logging::Logger::LoggerSmartPtr getLogger (); 00057 private: 00058 LoggingProxy *logger_mp; //we need separate logger, because we are in separate thread ... 00059 // ... other is one logger for all DDS reader thread 00060 unsigned int loggerInitCount_m; // we need to count how many time we call LoggerProxy::init 00061 }; 00062 00063 #endif //BULKDATA_NT_DDS_LOGGABLE