Add backtrace information to database debug log