18#ifndef _LOG4CXX_NET_SOCKET_APPENDER_SKELETON_H
19#define _LOG4CXX_NET_SOCKET_APPENDER_SKELETON_H
25#include <condition_variable>
28 #pragma warning ( push )
29 #pragma warning ( disable: 4251 )
52 helpers::InetAddressPtr address;
55 int reconnectionDelay;
97 address = helpers::InetAddress::getByName(host);
98 remoteHost.assign(host);
133 this->locationInfo = locationInfo1;
155 this->reconnectionDelay = reconnectionDelay1;
163 return reconnectionDelay;
194 std::condition_variable interrupt;
195 std::mutex interrupt_mutex;
206 #pragma warning (pop)
Implementation base class for all appenders.
Definition: appenderskeleton.h:46
Abstract base class for SocketAppender and XMLSocketAppender.
Definition: socketappenderskeleton.h:42
virtual void cleanUp(log4cxx::helpers::Pool &p)=0
void close()
Release any resources allocated within the appender such as file handles, network connections,...
SocketAppenderSkeleton(int defaultPort, int reconnectionDelay)
SocketAppenderSkeleton(const LogString &host, int port, int reconnectionDelay)
Connects to remote server at host and port.
bool getLocationInfo() const
Returns value of the LocationInfo option.
Definition: socketappenderskeleton.h:139
int getReconnectionDelay() const
Returns value of the ReconnectionDelay option.
Definition: socketappenderskeleton.h:161
SocketAppenderSkeleton(helpers::InetAddressPtr address, int port, int reconnectionDelay)
Connects to remote server at address and port.
void activateOptions(log4cxx::helpers::Pool &p)
Connect to the specified RemoteHost and Port.
void setPort(int port1)
The Port option takes a positive integer representing the port where the server is waiting for connec...
Definition: socketappenderskeleton.h:113
int getPort() const
Returns value of the Port option.
Definition: socketappenderskeleton.h:121
void setReconnectionDelay(int reconnectionDelay1)
The ReconnectionDelay option takes a positive integer representing the number of milliseconds to wait...
Definition: socketappenderskeleton.h:153
bool requiresLayout() const
This appender does not use a layout.
Definition: socketappenderskeleton.h:85
void setOption(const LogString &option, const LogString &value)
Set option to value.
void setRemoteHost(const LogString &host)
The RemoteHost option takes a string value which should be the host name of the server where a Apache...
Definition: socketappenderskeleton.h:95
~SocketAppenderSkeleton()
const LogString & getRemoteHost() const
Returns value of the RemoteHost option.
Definition: socketappenderskeleton.h:104
virtual int getDefaultDelay() const =0
virtual void setSocket(log4cxx::helpers::SocketPtr &socket, log4cxx::helpers::Pool &p)=0
void setLocationInfo(bool locationInfo1)
The LocationInfo option takes a boolean value.
Definition: socketappenderskeleton.h:131
virtual int getDefaultPort() const =0
Definition: messagehandler.h:23
std::basic_string< logchar > LogString
Definition: logstring.h:66