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>
Extend this class for implementing your own strategies for printing log statements.
tstring & formatEvent(const log4cplus::spi::InternalLoggingEvent &event) const
DeviceAppender(D &d, const helpers::Properties &props)
device_traits::device_type device_type
DeviceAppender(boost::shared_ptr< D > const &d, bool close_device=true)
virtual void append(log4cplus::spi::InternalLoggingEvent const &event)
Subclasses of Appender should implement this method to perform actual logging.
device_appender_detail::device_type_traits< Device > device_traits
virtual void close()
Release any resources allocated within the appender such as file handles, network connections,...
DeviceAppender(D &d, bool close_device=true)
virtual ~DeviceAppender()
DeviceAppender(boost::shared_ptr< D > const &d, const helpers::Properties &props)
bool exists(const log4cplus::tstring &key) const
Tests to see if key can be found in this map.
The internal representation of logging events.
#define LOG4CPLUS_TEXT(STRING)
LOG4CPLUS_EXPORT long write(SOCKET_TYPE sock, const SocketBuffer &buffer)
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)
std::basic_string< tchar > tstring
SharedAppenderPtr make_device_appender(T &d, bool close_device=true)
boost::shared_ptr< T > device_type
static T & unwrap(device_type const &ptr)
static device_type unwrap(device_type x)