summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/FStatement.cxx
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2013-06-04 13:51:40 +0300
committerJavier Fernandez <jfernandez@igalia.com>2013-06-06 09:37:44 +0000
commit31870fee1d9beef0ce537061361fef8619bf36ff (patch)
tree59a0ee2ebffd0c63aafb1f7eeee910f7f5d42134 /connectivity/source/drivers/firebird/FStatement.cxx
parentd0eb26c30cfb80420cd0fb36313db2e0337a4dd9 (diff)
fb-sdbc: Added logging support
Remember that in order to enable the logging output it is needed to properly set the SAL_LOG environment variable. For example: $ SAL_LOG="+INFO.connectivity.firebird" solver/unxlngx6/installation/opt/program/soffice.bin
Diffstat (limited to 'connectivity/source/drivers/firebird/FStatement.cxx')
-rw-r--r--connectivity/source/drivers/firebird/FStatement.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx
index 42195e84f336..6d3a9ed3c789 100644
--- a/connectivity/source/drivers/firebird/FStatement.cxx
+++ b/connectivity/source/drivers/firebird/FStatement.cxx
@@ -85,7 +85,7 @@ void OStatement_Base::disposeResultSet()
//------------------------------------------------------------------------------
void OStatement_BASE2::disposing()
{
- printf("DEBUG !!! connectivity.firebird => OStatement_BASE2::disposing() \n");
+ SAL_INFO("connectivity.firebird", "=> OStatement_BASE2::disposing().");
::osl::MutexGuard aGuard(m_aMutex);
@@ -146,7 +146,7 @@ void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException)
void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException)
{
- printf("DEBUG !!! connectivity.firebird => OStatement_Base::close() \n");
+ SAL_INFO("connectivity.firebird", "=> OStatement_Base::close().");
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -178,23 +178,24 @@ sal_Bool SAL_CALL OStatement_Base::execute( const ::rtl::OUString& sql ) throw(S
*/
static int pr_error (long* status, char* operation)
{
- printf("[\n");
- printf("PROBLEM ON \"%s\".\n", operation);
+ SAL_WARN("connectivity.firebird", "=> OStatement_Base static pr_error().");
isc_print_status(status);
- printf("SQLCODE:%d\n", isc_sqlcode(status));
-
- printf("]\n");
+ SAL_WARN("connectivity.firebird", "=> OStatement_Base static pr_error(). "
+ "PROBLEM ON " << operation << ". "
+ "SQLCODE: " << isc_sqlcode(status) << ".");
return 1;
}
Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
+ SAL_INFO("connectivity.firebird", "=> OStatement_Base::executeQuery(). "
+ "Got called with sql: " << sql);
+
char sqlStr[128];
strcpy(sqlStr, OUStringToOString( sql, RTL_TEXTENCODING_ASCII_US ).getStr());
- printf("DEBUG !!! connectivity.firebird => OStatement_Base::executeQuery() got called with sql: %s \n", sqlStr);
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
@@ -243,7 +244,8 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const ::rtl::OUS
if (isc_commit_transaction (status, &trans))
isc_print_status(status);
- printf("DEBuG !!! connectivity.firebird => OStatement_Base::executeQuery() Changes committed.\n");
+ SAL_INFO("connectivity.firebird", "=> OStatement_Base::executeQuery(). "
+ "Changes committed.");
m_xResultSet = xRS; // we nedd a reference to it for later use
return xRS;