00001 /* 00002 * Copyright (C) 2003-2009 Olivier Boudeville 00003 * 00004 * This file is part of the Ceylan library. 00005 * 00006 * The Ceylan library is free software: you can redistribute it and/or modify 00007 * it under the terms of either the GNU Lesser General Public License or 00008 * the GNU General Public License, as they are published by the Free Software 00009 * Foundation, either version 3 of these Licenses, or (at your option) 00010 * any later version. 00011 * 00012 * The Ceylan library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License and the GNU General Public License 00016 * for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License and the GNU General Public License along with the Ceylan library. 00020 * If not, see <http://www.gnu.org/licenses/>. 00021 * 00022 * Author: Olivier Boudeville (olivier.boudeville@esperide.com) 00023 * 00024 */ 00025 00026 00027 #ifndef CEYLAN_LOG_TRANSPORT_LISTENER_RAW_H_ 00028 #define CEYLAN_LOG_TRANSPORT_LISTENER_RAW_H_ 00029 00030 00031 #include "CeylanLog.h" // for LogException 00032 #include "CeylanLogTransport.h" // for inheritance 00033 #include "CeylanLogListener.h" // for inheritance 00034 00035 #include <string> 00036 00037 00038 00039 namespace Ceylan 00040 { 00041 00042 00043 namespace Log 00044 { 00045 00046 00047 // Where the transports output their log messages. 00048 class LogAggregator ; 00049 00050 00065 class CEYLAN_DLL LogTransportListenerRaw : 00066 public LogTransport, public LogListener 00067 { 00068 00069 00070 public: 00071 00072 00078 explicit LogTransportListenerRaw( LogAggregator & aggregator ) ; 00079 00080 00082 virtual ~LogTransportListenerRaw() throw() ; 00083 00084 00085 00097 virtual void propagate( LogMessage & message ) ; 00098 00099 00100 00112 virtual const std::string toString( 00113 Ceylan::VerbosityLevels level = Ceylan::high ) const ; 00114 00115 00116 00117 private: 00118 00119 00129 LogTransportListenerRaw( 00130 const LogTransportListenerRaw & source ) ; 00131 00132 00141 LogTransportListenerRaw & operator = ( 00142 const LogTransportListenerRaw & source ) ; 00143 00144 00145 } ; 00146 00147 } 00148 00149 } 00150 00151 00152 #endif // CEYLAN_LOG_TRANSPORT_LISTENER_RAW_H_ 00153