added backtrace to query logging

I've added a stacktrace to each logged query to be able to display it later on. This can help to find out why a query has been executed.