author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Tue, 28 Jun 2011 17:59:31 +0200 | |
changeset 7570 | 648bf83945a5 |
parent 7529 | 2fdc310be7cd |
child 8626 | e2ba137b2bf9 |
permissions | -rw-r--r-- |
5924
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
1 |
.. -*- coding: utf-8 -*- |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
2 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
3 |
.. _DEBUGGING: |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
4 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
5 |
Debugging RQL |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
6 |
------------- |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
7 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
8 |
Available levels |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
9 |
~~~~~~~~~~~~~~~~ |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
10 |
|
7529
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
11 |
Server debugging flags. They may be combined using binary operators. |
5924
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
12 |
|
7529
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
13 |
.. autodata:: cubicweb.server.DBG_NONE |
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
14 |
.. autodata:: cubicweb.server.DBG_RQL |
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
15 |
.. autodata:: cubicweb.server.DBG_SQL |
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
16 |
.. autodata:: cubicweb.server.DBG_REPO |
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
17 |
.. autodata:: cubicweb.server.DBG_MS |
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
18 |
.. autodata:: cubicweb.server.DBG_MORE |
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
19 |
.. autodata:: cubicweb.server.DBG_ALL |
5924
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
20 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
21 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
22 |
Enable verbose output |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
23 |
~~~~~~~~~~~~~~~~~~~~~ |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
24 |
|
7079
6024de6094f6
[doc] fix rql/debugging.rst and server.__init__ docstrings
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
5924
diff
changeset
|
25 |
To debug your RQL statements, it can be useful to enable a verbose output: |
5924
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
26 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
27 |
.. sourcecode:: python |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
28 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
29 |
from cubicweb import server |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
30 |
server.set_debug(server.DBG_RQL|server.DBG_SQL|server.DBG_ALL) |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
31 |
|
7529
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
32 |
.. autofunction:: cubicweb.server.set_debug |
2fdc310be7cd
[book] add autoload section from code and fix sphinx warnings
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
7079
diff
changeset
|
33 |
|
5924
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
34 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
35 |
Detect largest RQL queries |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
36 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
37 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
38 |
See `Profiling and performance` chapter (see :ref:`PROFILING`). |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
39 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
40 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
41 |
API |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
42 |
~~~ |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
43 |
|
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
44 |
.. autoclass:: cubicweb.server.debugged |
b218df942dd4
[book] update rql documentation and some erroneous/deprecated examples
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
diff
changeset
|
45 |