Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

pierredup
Copy link

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

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-1036

We use Jira to track the state of pull requests and the versions they got
included in.

{
$backtrace = array();

foreach ($trace as $index => $line) {
Copy link
Member

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()
Copy link
Member

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"

@morozov
Copy link
Member

morozov commented Nov 17, 2017

No more loggers, please. A PSR-3 adapter would be much more welcome.

@lcobucci
Copy link
Member

Closing this as per @morozov's comment.

@ostrolucky
Copy link
Member

Implemented in doctrine/DoctrineBundle#954

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants