log4tango
4.0.3
|
00001 // 00002 // LoggingEvent.hh 00003 // 00004 // Copyright (C) : 2000 - 2002 00005 // LifeLine Networks BV (www.lifeline.nl). All rights reserved. 00006 // Bastiaan Bakker. All rights reserved. 00007 // 00008 // 2004,2005,2006,2007,2008,2009,2010 00009 // Synchrotron SOLEIL 00010 // L'Orme des Merisiers 00011 // Saint-Aubin - BP 48 - France 00012 // 00013 // This file is part of log4tango. 00014 // 00015 // Log4ango is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU Lesser General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 // Log4tango is distributed in the hope that it will be useful, 00021 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 // GNU Lesser General Public License for more details. 00024 // 00025 // You should have received a copy of the GNU Lesser General Public License 00026 // along with Log4Tango. If not, see <http://www.gnu.org/licenses/>. 00027 00028 #ifndef _LOG4TANGO_LOGGINGEVENT_H 00029 #define _LOG4TANGO_LOGGINGEVENT_H 00030 00031 #include <log4tango/Portability.hh> 00032 #include <string> 00033 00034 #include <log4tango/Level.hh> 00035 #include <log4tango/TimeStamp.hh> 00036 00037 namespace log4tango { 00038 00047 //----------------------------------------------------------------------------- 00048 // struct : LoggingEvent 00049 //----------------------------------------------------------------------------- 00050 struct LOG4TANGO_EXPORT LoggingEvent 00051 { 00052 public: 00063 #ifdef LOG4TANGO_HAS_NDC 00064 LoggingEvent(const std::string& logger, 00065 const std::string& message, 00066 const std::string& ndc, 00067 Level::Value level); 00068 #else 00069 LoggingEvent(const std::string& logger, 00070 const std::string& message, 00071 Level::Value level); 00072 #endif // LOG4TANGO_HAS_NDC 00073 00075 LoggingEvent(const LoggingEvent& event); 00076 00078 const std::string logger_name; 00079 00081 const std::string message; 00082 00083 #ifdef LOG4TANGO_HAS_NDC 00084 00085 const std::string ndc; 00086 #endif 00087 00089 Level::Value level; 00090 00092 //std::string thread_name; 00093 00095 long thread_id; 00096 00099 TimeStamp timestamp; 00100 00101 private: 00103 const LoggingEvent& operator= (const LoggingEvent&); 00104 }; 00105 00106 } // namespace log4tango 00107 00108 #endif // _LOG4TANGO_LOGGINGEVENT_H 00109