New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added TraceLogger to get backtrace for executed queries #719
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DBAL-1036 We use Jira to track the state of pull requests and the versions they got |
{ | ||
$backtrace = array(); | ||
|
||
foreach ($trace as $index => $line) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not simply storing the trace and that's it? Dumping a trace is a separate concern
} | ||
} | ||
|
||
private function getBactrace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "Backtrace" with a "k"
No more loggers, please. A PSR-3 adapter would be much more welcome. |
Closing this as per @morozov's comment. |
Implemented in doctrine/DoctrineBundle#954 |
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