Added TraceLogger to get backtrace for executed queries

Added a TraceLogger that returns a backtrace for the executed query.
The backtrace returns the last 10 frames, and it also formats the frames for easy reading
Will update the test. Would it be sufficient to just test if the trace is an array and contains a specified amount of values, without actually checking what those values are?