Skip to content

Commit cd2928e

Browse files
committed
added last_error to exec failure log
1 parent 1d06005 commit cd2928e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

postgres_asio/postgres_asio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ namespace postgres_asio
215215
break;
216216
case PGRES_BAD_RESPONSE:
217217
case PGRES_FATAL_ERROR:
218-
BOOST_LOG_TRIVIAL(error) << _log_id << ", postgres::exec failed, t=" << duration << ", s=" << _current_statement.substr(0, STATEMENT_LOG_BYTES);
218+
BOOST_LOG_TRIVIAL(error) << _log_id << ", postgres::exec failed " << last_error() << ", t=" << duration << ", s=" << _current_statement.substr(0, STATEMENT_LOG_BYTES);
219219
cb(status, std::move(last_result));
220220
break;
221221
default:

0 commit comments

Comments
 (0)