Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: Allow logging of sql statements + parameters and Yii::trace('som…
…emessage', 'vardump') to show in firebug / console when debug=2 for easier debugging
- Loading branch information
1 parent
41531ea
commit a38e102
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a38e102
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.
Hello,
If we want to debug some var, and use vardump for this, it's very difficult to find vardump trace.
Maybe it's best to have an $config['config']['debugsql'] var.
And this can be set in config-default.php
a38e102
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.
Or we add debug sql info only on debug level 4?
a38e102
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.
Think debug SQL is dfferent from debug.
View possibility included in Yii to have some debug : notice/strict etc ...
But add a $config['config']['debugsql'] for sql debugging.
Carsten : are you OK if i move it trye to move it config-default.php ? I have to remove it from LSYii_Application.phpto have my own debug mode.
a38e102
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.
@mennodekker This patch seems to have completely broken the installer. Can you have another look please? I think Shnoulle has a good idea with making this a separate config param.
a38e102
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.
broken installer is fixed in 82fc410
config option that respects existing routes added in 61f4731
@Schnoulle, in console i now get two separate panels for vardump and sql log. not sure if it still is a problem with your custom logging, if you let me know your config i can maybe figure out a way to fix it
a38e102
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.
Menno, I look to have a $categories var :)
a38e102
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.
The way I tried to make it now is that you can have your own route with all params you like in your own config.php and the ones for debug / debugsql will be added to that instead of replacing it. So you can have the http://www.yiiframework.com/extension/yii-debug-toolbar/ for example, while for people who don't add that to their config have the console logging.
a38e102
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.
Hello,
Sorry, don't have time to review it.
But seems OK with : array_key_exists \o/ and the easy way to use debug mode :).
Now, just add some Yii::trace(CVarDumper::dumpAsString($anotherTest),'vardump') for "not dev user" purpose ;).