18 #ifndef _LOG4CXX_DB_ODBC_APPENDER_H 19 #define _LOG4CXX_DB_ODBC_APPENDER_H 22 #pragma warning ( push ) 23 #pragma warning ( disable: 4231 4251 4275 4786 ) 27 #include <log4cxx/log4cxx.h> 42 void* hInput,
const char* prolog,
47 const char* formatMessage(
short fHandleType,
48 void* hInput,
const char* prolog,
161 virtual ~ODBCAppender();
171 virtual
void activateOptions(
log4cxx::helpers::Pool& p);
188 helpers::Pool& p) const;
198 virtual
void execute(const
LogString& sql,
208 virtual
void closeConnection(SQLHDBC con);
216 virtual SQLHDBC getConnection(
log4cxx::helpers::Pool& p) ;
223 virtual
void close();
232 virtual
void flushBuffer(
log4cxx::helpers::Pool& p);
237 virtual
bool requiresLayout()
const 270 databasePassword = password;
276 bufferSize = newBufferSize;
293 return databasePassword;
303 #if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR_T || defined(WIN32) || defined(_WIN32) 304 static void encode(
wchar_t** dest,
const LogString& src,
307 static void encode(
unsigned short** dest,
const LogString& src,
315 #if defined(_MSC_VER) 316 #pragma warning ( pop ) 319 #endif // _LOG4CXX_DB_ODBC_APPENDER_H #define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:153
std::list< spi::LoggingEventPtr > buffer
ArrayList holding the buffer of Logging Events.
Definition: odbcappender.h:151
SQLHENV env
Definition: odbcappender.h:129
const LogString & getSql() const
Returns pre-formated statement eg: insert into LogTable (msg) values ("%m")
Definition: odbcappender.h:250
void * SQLHDBC
Definition: odbcappender.h:116
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:147
Implementation base class for all appenders.
Definition: appenderskeleton.h:43
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:37
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:141
const LogString & getURL() const
Definition: odbcappender.h:285
Definition: odbcappender.h:38
void setBufferSize(size_t newBufferSize)
Definition: odbcappender.h:274
LogString databaseUser
User to connect as for default connection handling.
Definition: odbcappender.h:109
SQLHDBC connection
Connection used by default.
Definition: odbcappender.h:128
void setURL(const LogString &url)
Definition: odbcappender.h:262
void setUser(const LogString &user)
Definition: odbcappender.h:256
#define DECLARE_LOG4CXX_OBJECT(object)
Definition: object.h:39
LogString sqlStatement
Stores the string given to the pattern layout for conversion into a SQL statement, eg: insert into LogTable (Thread, File, Message) values ("%t", "%F", "%m")
Definition: odbcappender.h:140
const LogString & getUser() const
Definition: odbcappender.h:279
void setPassword(const LogString &password)
Definition: odbcappender.h:268
short SQLSMALLINT
Definition: odbcappender.h:119
const LogString & getPassword() const
Definition: odbcappender.h:291
LOG4CXX_PTR_DEF(ODBCAppender)
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition: object.h:159
Definition: odbcappender.h:98
LogString databaseURL
URL of the DB for default connection handling.
Definition: odbcappender.h:104
size_t getBufferSize() const
Definition: odbcappender.h:296
size_t bufferSize
size of LoggingEvent buffer before writing to the database.
Definition: odbcappender.h:146
Definition: appender.h:32
std::basic_string< logchar > LogString
Definition: logstring.h:66
The class Exception and its subclasses indicate conditions that a reasonable application might want t...
Definition: exception.h:37
void * SQLHANDLE
Definition: odbcappender.h:118
LogString databasePassword
User to use for default connection handling.
Definition: odbcappender.h:114
void * SQLHENV
Definition: odbcappender.h:117