~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
.. _logging_query_plugin:

Query Logging
=============

The :program:`logging_query` plugin logs queries to a CSV file.

.. _logging_query_loading:

Loading
-------

To load this plugin, start :program:`drizzled` with::

   --plugin-add=logging_query

Loading the plugin may not enable or configure it.  See the plugin's
:ref:`logging_query_configuration` and :ref:`logging_query_variables`.

.. seealso:: :ref:`drizzled_plugin_options` for more information about adding and removing plugins.

.. _logging_query_configuration:

Configuration
-------------

These command line options configure the plugin when :program:`drizzled`
is started.  See :ref:`command_line_options` for more information about specifying
command line options.

.. program:: drizzled

.. option:: --logging-query.enable 

   :Default: false
   :Variable: :ref:`logging_query_enable <logging_query_enable>`

   Enable logging to CSV file.

.. option:: --logging-query.filename 

   :Default: 
   :Variable: :ref:`logging_query_filename <logging_query_filename>`

   File to log to.

.. option:: --logging-query.pcre ARG

   :Default: 
   :Variable: :ref:`logging_query_pcre <logging_query_pcre>`

   PCRE to match the query against.

.. option:: --logging-query.threshold-big-examined 

   :Default: 0
   :Variable: :ref:`logging_query_threshold_big_examined <logging_query_threshold_big_examined>`

   Threshold for logging big queries by rows examined.

.. option:: --logging-query.threshold-big-resultset 

   :Default: 0
   :Variable: :ref:`logging_query_threshold_big_resultset <logging_query_threshold_big_resultset>`

   Threshold for logging big queries by result set size.

.. option:: --logging-query.threshold-slow 

   :Default: 0
   :Variable: :ref:`logging_query_threshold_slow <logging_query_threshold_slow>`

   Threshold for logging slow queries by execution time.

.. _logging_query_variables:

Variables
---------

These variables show the running configuration of the plugin.
See `variables` for more information about querying and setting variables.

.. _logging_query_enable:

* ``logging_query_enable``

   :Scope: Global
   :Dynamic: No
   :Option: :option:`--logging-query.enable`

   Enable logging to CSV file.

.. _logging_query_filename:

* ``logging_query_filename``

   :Scope: Global
   :Dynamic: No
   :Option: :option:`--logging-query.filename`

   File to log to.

.. _logging_query_pcre:

* ``logging_query_pcre``

   :Scope: Global
   :Dynamic: No
   :Option: :option:`--logging-query.pcre`

   PCRE to match the query against.

.. _logging_query_threshold_big_examined:

* ``logging_query_threshold_big_examined``

   :Scope: Global
   :Dynamic: No
   :Option: :option:`--logging-query.threshold-big-examined`

   Threshold for logging big queries by rows examined.

.. _logging_query_threshold_big_resultset:

* ``logging_query_threshold_big_resultset``

   :Scope: Global
   :Dynamic: No
   :Option: :option:`--logging-query.threshold-big-resultset`

   Threshold for logging big queries by result set size.

.. _logging_query_threshold_slow:

* ``logging_query_threshold_slow``

   :Scope: Global
   :Dynamic: No
   :Option: :option:`--logging-query.threshold-slow`

   Threshold for logging slow queries by execution time.

.. _logging_query_examples:

Examples
--------

Sorry, there are no examples for this plugin.

.. _logging_query_authors:

Authors
-------

Mark Atwood

.. _logging_query_version:

Version
-------

This documentation applies to **logging_query 0.2**.

To see which version of the plugin a Drizzle server is running, execute:

.. code-block:: mysql

   SELECT MODULE_VERSION FROM DATA_DICTIONARY.MODULES WHERE MODULE_NAME='logging_query'

Changelog
---------

v0.2
^^^^
* First release.