18#ifndef _LOG4CXX_DB_ODBC_APPENDER_H
19#define _LOG4CXX_DB_ODBC_APPENDER_H
21#include <log4cxx/log4cxx.h>
27#if LOG4CXX_EVENTS_AT_EXIT
28#include <log4cxx/private/atexitregistry.h>
38class LOG4CXX_EXPORT
SQLException :
public LOG4CXX_NS::helpers::Exception
42 void* hInput,
const char* prolog,
43 LOG4CXX_NS::helpers::Pool& p);
47 const char* formatMessage(
short fHandleType,
48 void* hInput,
const char* prolog,
49 LOG4CXX_NS::helpers::Pool& p);
182 void activateOptions(helpers::Pool& p) override;
187 void append(const spi::LoggingEventPtr& event, helpers::Pool&) override;
193 LogString getLogStatement(const spi::LoggingEventPtr& event,
194 helpers::Pool& p) const;
201 LOG4CXX_NS::helpers::Pool& p) ;
218 virtual
SQLHDBC getConnection(LOG4CXX_NS::helpers::Pool& p) ;
225 void close() override;
234 virtual
void flushBuffer(LOG4CXX_NS::helpers::Pool& p);
239 bool requiresLayout() const override;
258 void setBufferSize(
size_t newBufferSize);
266 size_t getBufferSize() const;
270#if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR_T || defined(WIN32) || defined(_WIN32)
271 static void encode(
wchar_t** dest,
const LogString& src,
272 LOG4CXX_NS::helpers::Pool& p);
274 static void encode(
unsigned short** dest,
const LogString& src,
275 LOG4CXX_NS::helpers::Pool& p);
278 struct ODBCAppenderPriv;
Implementation base class for all appenders.
Definition: appenderskeleton.h:41
The ODBCAppender sends log events to a database.
Definition: odbcappender.h:143
void * SQLHENV
Definition: odbcappender.h:152
void * SQLHDBC
Definition: odbcappender.h:151
void * SQLHANDLE
Definition: odbcappender.h:153
short SQLSMALLINT
Definition: odbcappender.h:154
Definition: odbcappender.h:39
SQLException(const char *msg)
SQLException(const SQLException &src)
SQLException(short fHandleType, void *hInput, const char *prolog, log4cxx::helpers::Pool &p)
std::basic_string< logchar > LogString
Definition: logstring.h:60
LOG4CXX_PTR_DEF(Appender)
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:158
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:152
#define DECLARE_LOG4CXX_OBJECT(object)
Definition: object.h:43
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition: object.h:164
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:146