Skip to content

Commit

Permalink
docs: add "Logging All SQL Queries"
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Feb 20, 2024
1 parent 40144c4 commit 9f513ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion user_guide_src/source/database/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ uses this to collect the queries to display in the Toolbar.
The Events
**********

.. _database-events-dbquery:

DBQuery
=======

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

An example usage might be:
An example to log all queries:

.. literalinclude:: events/001.php
6 changes: 6 additions & 0 deletions user_guide_src/source/testing/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ It would be a good idea to check them if things aren't working the way you expec
You can adjust the error threshold to see more or fewer messages. See
:ref:`Logging <logging-configuration>` for details.

Logging All SQL Queries
=======================

All SQL queries issued by CodeIgniter can be logged.
See :ref:`Database Events <database-events-dbquery>` for details.

********************
Replacing var_dump()
********************
Expand Down

0 comments on commit 9f513ae

Please sign in to comment.