24 #ifndef LOG4CPLUS_BOOST_DEVICEAPPENDER_HXX 25 #define LOG4CPLUS_BOOST_DEVICEAPPENDER_HXX 29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE) 33 #include <boost/utility/enable_if.hpp> 34 #include <boost/type_traits/is_same.hpp> 35 #include <boost/mpl/not.hpp> 36 #include <boost/iostreams/operations.hpp> 37 #include <boost/shared_ptr.hpp> 45 namespace device_appender_detail
80 template <
typename Device>
100 template <
typename D>
111 template <
typename D>
142 str.c_str (), str.size ());
154 template <
typename T>
164 template <
typename T>
174 template <
typename T>
178 bool close_device =
true)
186 template <
typename T>
201 #endif // LOG4CPLUS_BOOST_DEVICEAPPENDER_HXX device_appender_detail::device_type_traits< Device > device_traits
The internal representation of logging events.
LOG4CPLUS_EXPORT long write(SOCKET_TYPE sock, const SocketBuffer &buffer)
virtual void append(log4cplus::spi::InternalLoggingEvent const &event)
Subclasses of Appender should implement this method to perform actual logging.
DeviceAppender(boost::shared_ptr< D > const &d, bool close_device=true)
virtual ~DeviceAppender()
#define LOG4CPLUS_TEXT(STRING)
device_traits::device_type device_type
DeviceAppender(boost::shared_ptr< D > const &d, const helpers::Properties &props)
static T & unwrap(device_type const &ptr)
virtual void close()
Release any resources allocated within the appender such as file handles, network connections,...
tstring & formatEvent(const log4cplus::spi::InternalLoggingEvent &event) const
DeviceAppender(D &d, const helpers::Properties &props)
helpers::SharedObjectPtr< Appender > SharedAppenderPtr
This is a pointer to an Appender.
SharedAppenderPtr make_device_appender_sp(boost::shared_ptr< T > const &p, bool close_device=true)
boost::shared_ptr< T > device_type
std::basic_string< tchar > tstring
DeviceAppender(D &d, bool close_device=true)
bool exists(const log4cplus::tstring &key) const
Tests to see if key can be found in this map.
SharedAppenderPtr make_device_appender(T &d, bool close_device=true)
Extend this class for implementing your own strategies for printing log statements.
static device_type unwrap(device_type x)