[DBAL-401] Log connection info with SQL logger Created: 28/Dec/12 Updated: 28/Dec/12 Resolved: 28/Dec/12 |
|
| Status: | Resolved |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Ananda Agrawal | Assignee: | Benjamin Eberlei |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Description |
|
while using MasterSlave connection, it would be nice to see the connection being used ( master or which slave), this will help debug the app, if lots read queries are going to Master |
| Comments |
| Comment by Benjamin Eberlei [ 28/Dec/12 ] |
|
It is possible already, when you have a logger that has access to the connection again. MasterSlaveConnection#isConnectedToMaster() can be used to check. Since we don't provide any useful loggers for production anyways this is up to your own logger. |
| Comment by Ananda Agrawal [ 28/Dec/12 ] |
|
thanks Eberlei, when using SQLLogger I donot get much information other than the query and params etc, I am using DebugStack or willing to extend it but Connection objects looks like they donot send much info, is there a way this could be achieved |