Skip to content

Commit 9f513ae

Browse files
committed
docs: add "Logging All SQL Queries"
1 parent 40144c4 commit 9f513ae

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

user_guide_src/source/database/events.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ uses this to collect the queries to display in the Toolbar.
1515
The Events
1616
**********
1717

18+
.. _database-events-dbquery:
19+
1820
DBQuery
1921
=======
2022

@@ -26,6 +28,6 @@ You could use this to display all queries in STDOUT, or logging to a file, or
2628
even creating tools to do automatic query analysis to help you spot potentially
2729
missing indexes, slow queries, etc.
2830

29-
An example usage might be:
31+
An example to log all queries:
3032

3133
.. literalinclude:: events/001.php

user_guide_src/source/testing/debugging.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ It would be a good idea to check them if things aren't working the way you expec
2323
You can adjust the error threshold to see more or fewer messages. See
2424
:ref:`Logging <logging-configuration>` for details.
2525

26+
Logging All SQL Queries
27+
=======================
28+
29+
All SQL queries issued by CodeIgniter can be logged.
30+
See :ref:`Database Events <database-events-dbquery>` for details.
31+
2632
********************
2733
Replacing var_dump()
2834
********************

0 commit comments

Comments
 (0)