Skip to content

Commit 2bf3502

Browse files
committed
Fix trace docs still using parts of FB 2.5 syntax
1 parent 2a02c8c commit 2bf3502

File tree

2 files changed

+77
-77
lines changed

2 files changed

+77
-77
lines changed

doc/README.trace_services

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
Trace and audit services.
33

44
Firebird 2.5 offers new trace and audit facilities. These new abilities allow
@@ -12,7 +12,7 @@ engine. List of events to trace, which data items to trace and placement of
1212
trace output is specified by trace configuration when trace session is created.
1313

1414
There are two kinds of trace sessions : system audit and user trace.
15-
15+
1616
System audit session is started by the engine itself and obtains configuration
1717
from the text file. The name of this file is set via new setting in firebird.conf
1818
("AuditTraceConfigFile") and by default has empty value, i.e. no system audit
@@ -44,7 +44,7 @@ session. When application reads part of the output so output size stay less than
4444

4545
When application decides to stop its trace session it just does detach from
4646
service. Also there is ability to manage trace sessions (suspend\resume\stop).
47-
Administrators are allowed to manage any trace session while ordinary users are
47+
Administrators are allowed to manage any trace session while ordinary users are
4848
allowed to manage their own trace sessions only.
4949

5050
If user trace session was created by ordinary user it will trace only
@@ -65,9 +65,9 @@ plugin is responsible for logging these events in some form.
6565

6666
There is "standard" implementation of trace plugin, fbtrace.dll (.so) located
6767
in \plugins folder.
68-
6968

70-
There is new specialized standalone utility to work with trace services :
69+
70+
There is new specialized standalone utility to work with trace services :
7171
fbtracemgr. It has the following command line switches :
7272

7373
Action switches :
@@ -94,20 +94,20 @@ Also, it prints usage screen if run without parameters.
9494

9595

9696
Examples
97-
97+
9898
I. Sample configuration files for user trace sessions:
99-
99+
100100
a) Trace prepare, free and execution of all statements within connection 12345
101101

102102
database
103103
{
104-
enabled true
105-
connection_id 12345
106-
log_statement_prepare true
107-
log_statement_free true
108-
log_statement_start true
109-
log_statement_finish true
110-
time_threshold 0
104+
enabled = true
105+
connection_id = 12345
106+
log_statement_prepare= true
107+
log_statement_free = true
108+
log_statement_start = true
109+
log_statement_finish = true
110+
time_threshold = 0
111111
}
112112

113113
b) Trace all connections of given user to database mydatabase.fdb
@@ -116,28 +116,28 @@ b) Trace all connections of given user to database mydatabase.fdb
116116

117117
database = %[\\/]mydatabase.fdb
118118
{
119-
enabled true
120-
include_filter (%)(INSERT|UPDATE|DELETE)(%)
121-
log_statement_finish true
122-
log_procedure_finish true
123-
log_trigger_finish true
124-
print_plan true
125-
print_perf true
126-
time_threshold 0
119+
enabled = true
120+
include_filter = (%)(INSERT|UPDATE|DELETE)(%)
121+
log_statement_finish = true
122+
log_procedure_finish = true
123+
log_trigger_finish = true
124+
print_plan = true
125+
print_perf = true
126+
time_threshold = 0
127127
}
128-
128+
129129
c) Trace connections and transactions in all databases except of security database
130130

131131
database
132132
{
133-
enabled true
134-
log_connections true
135-
log_transactions true
133+
enabled = true
134+
log_connections = true
135+
log_transactions = true
136136
}
137137

138138
database = security.db
139139
{
140-
enabled false
140+
enabled = false
141141
}
142142

143143

@@ -148,27 +148,27 @@ a) Start user trace named "My trace" using configuration file fbtrace.conf and r
148148
its output on the screen :
149149

150150
fbtracemgr -se service_mgr -start -name "My trace" -config fbtrace.conf
151-
151+
152152
To stop this trace session press Ctrl+C at fbtracemgr console window. Or, in
153-
another console : list sessions and look for interesting session ID (b) and stop it
153+
another console : list sessions and look for interesting session ID (b) and stop it
154154
using this found ID (e).
155155

156156
b) List trace sessions
157157

158158
fbtracemgr -se service_mgr -list
159-
159+
160160
c) Suspend trace session with ID 1
161161

162162
fbtracemgr -se service_mgr -suspend -id 1
163-
163+
164164
d) Resume trace session with ID 1
165165

166166
fbtracemgr -se service_mgr -resume -id 1
167-
167+
168168
e) Stop trace session with ID 1
169169

170170
fbtracemgr -se service_mgr -stop -id 1
171-
171+
172172

173173

174174
There are three general use cases :

src/utilities/ntrace/fbtrace.conf

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
# expression which is matched against fully qualified database path name.
1212
#
1313
# For log file name Sed syntax for substitutions is supported.
14-
# I.e. \0 - whole matched string, \1 ... \9 - parenthesis subexpressions.
14+
# I.e. \0 - whole matched string, \1 ... \9 - parenthesis subexpressions.
1515
# \\ is backslash.
1616
#
17-
# String values should be enclosed into double quotes if contains
17+
# String values should be enclosed into double quotes if contains
1818
# spaces embedded, for example:
1919
# log_filename "C:\\Documents and Settings\\Firebird\\My Documents\\trace.log"
2020
# include_filter "Database Stats"
2121
#
22-
# To enter curvy brackets { } somewhere in a configuration dup them: {{ }}.
22+
# To enter braces { } in a configuration value, double them: {{ }}.
2323
# For example - to enter this regular expression
2424
# database = (%[\\/](e[[:DIGIT:]]{2}).fdb)
2525
# type
@@ -41,72 +41,72 @@ database
4141
# Operations log file name. For use by system audit trace only
4242
#log_filename = name
4343

44-
# Maximum size of log file (megabytes). Used by system audit trace for
44+
# Maximum size of log file (megabytes). Used by system audit trace for
4545
# log's rotation : when current log file reached this limit it is renamed
46-
# using current date and time and new log file is created. Value of zero
46+
# using current date and time and new log file is created. Value of zero
4747
# means that the log file size is unlimited and rotation will never happen.
4848
#max_log_size = 0
4949

5050

51-
# SQL query filters.
51+
# SQL query filters.
5252
#
53-
# Only SQL statements falling under given regular expression are reported
53+
# Only SQL statements falling under given regular expression are reported
5454
# in the log.
55-
#include_filter
55+
#include_filter =
5656

57-
# SQL statements falling under given regular expression are NOT reported
57+
# SQL statements falling under given regular expression are NOT reported
5858
# in the log.
59-
#exclude_filter
59+
#exclude_filter =
6060

6161

62-
# Put attach/detach log records
62+
# Put attach/detach log records
6363
#log_connections = false
6464

65-
# Trace only given connection id. If zero - trace all connections
65+
# Trace only given connection id. If zero - trace all connections
6666
#connection_id = 0
6767

68-
# Put transaction start/end records
68+
# Put transaction start/end records
6969
#log_transactions = false
7070

7171

72-
# Put sql statement prepare records
72+
# Put sql statement prepare records
7373
#log_statement_prepare = false
7474

75-
# Put sql statement free records
75+
# Put sql statement free records
7676
#log_statement_free = false
7777

78-
# Put sql statement execution start records
78+
# Put sql statement execution start records
7979
#log_statement_start = false
80-
81-
# Put sql statement execution finish\fetch to eof records
80+
81+
# Put sql statement execution finish\fetch to eof records
8282
#log_statement_finish = false
8383

8484

8585
# Put record when stored procedure is being compiled
8686
#log_procedure_compile = false
8787

88-
# Put record when stored procedure is start execution
88+
# Put record when stored procedure is start execution
8989
#log_procedure_start = false
9090

91-
# Put record when stored procedure is finish execution
91+
# Put record when stored procedure is finish execution
9292
#log_procedure_finish = false
9393

9494
# Put record when stored function is being compiled
9595
#log_function_compile = false
9696

97-
# Put record when stored function is start execution
97+
# Put record when stored function is start execution
9898
#log_function_start = false
9999

100-
# Put record when stored function is finish execution
100+
# Put record when stored function is finish execution
101101
#log_function_finish = false
102102

103103
# Put record when trigger is being compiled
104104
#log_trigger_compile = false
105105

106-
# Put trigger execute records
106+
# Put trigger execute records
107107
#log_trigger_start = false
108108

109-
# Put trigger execute records
109+
# Put trigger execute records
110110
#log_trigger_finish = false
111111

112112

@@ -125,11 +125,11 @@ database
125125

126126
# Include filter. If empty, trace all errors\warnings events.
127127
# Else trace event if any code from list is found in status-vector.
128-
#include_gds_codes
128+
#include_gds_codes =
129129

130130
# Exclude filter. If empty, trace all errors\warnings events.
131131
# Else trace event if no code from list is found in status-vector.
132-
#exclude_gds_codes
132+
#exclude_gds_codes =
133133

134134
# Put trace session init and finish messages
135135
#log_initfini = true
@@ -148,13 +148,13 @@ database
148148
#print_perf = false
149149

150150

151-
# Put blr requests compile/execute records
151+
# Put blr requests compile/execute records
152152
#log_blr_requests = false
153153

154154
# Print blr requests or not
155155
#print_blr = false
156156

157-
# Put dyn requests execute records
157+
# Put dyn requests execute records
158158
#log_dyn_requests = false
159159

160160
# Print dyn requests or not
@@ -164,27 +164,27 @@ database
164164
# Put xxx_finish record only if its timing exceeds this number of milliseconds
165165
#time_threshold = 100
166166

167-
# Maximum length of SQL string logged
167+
# Maximum length of SQL string logged
168168
#max_sql_length = 300
169169

170-
# Maximum length of blr request logged
170+
# Maximum length of blr request logged
171171
#max_blr_length = 500
172172

173-
# Maximum length of dyn request logged
173+
# Maximum length of dyn request logged
174174
#max_dyn_length = 500
175175

176-
# Maximum length of individual string argument we log
176+
# Maximum length of individual string argument we log
177177
#max_arg_length = 80
178178

179-
# Maximum number of query arguments to put in log
179+
# Maximum number of query arguments to put in log
180180
#max_arg_count = 30
181181
}
182182

183183

184184

185185
# default services section
186186
#
187-
# List of names of currently existing Firebird services (to use with service
187+
# List of names of currently existing Firebird services (to use with service
188188
# filters below) :
189189
# Backup Database
190190
# Restore Database
@@ -209,27 +209,27 @@ database
209209
# Display User with Admin Info
210210
# Validate Database
211211
#
212-
services
212+
services
213213
{
214214
# Do we trace services events or not
215215
#enabled = false
216216

217217
# Operations log file name. For use by system audit trace only
218218
#log_filename = name
219219

220-
# Maximum size of log file (megabytes). Used by system audit trace for
221-
# log's rotation
220+
# Maximum size of log file (megabytes). Used by system audit trace for
221+
# log's rotation
222222
#max_log_size = 0
223223

224224
# Services filters.
225225
#
226-
# Only services whose names fall under given regular expression are
226+
# Only services whose names fall under given regular expression are
227227
# reported in the log.
228-
#include_filter
228+
#include_filter =
229229

230-
# Services whose names fall under given regular expression are NOT
230+
# Services whose names fall under given regular expression are NOT
231231
# reported in the log.
232-
#exclude_filter
232+
#exclude_filter =
233233

234234
# Put service attach, detach and start records
235235
#log_services = false
@@ -249,11 +249,11 @@ services
249249

250250
# Include filter. If empty, trace all errors\warnings events.
251251
# Else trace event if any code from list is found in status-vector.
252-
#include_gds_codes
252+
#include_gds_codes =
253253

254254
# Exclude filter. If empty, trace all errors\warnings events.
255255
# Else trace event if no code from list is found in status-vector.
256-
#exclude_gds_codes
256+
#exclude_gds_codes =
257257

258258
# Put trace session init and finish messages
259259
#log_initfini = true
@@ -271,7 +271,7 @@ database = %[\\/]my_database.fdb
271271

272272

273273
# Enable logging for test.fdb, azk2.fdb and rulez.fdb in any directory
274-
# into log file name matching database name - test.log, azk2.log and
274+
# into log file name matching database name - test.log, azk2.log and
275275
# rulez.log appropriately
276276
#
277277
database = %[\\/](test|azk2|rulez).fdb

0 commit comments

Comments
 (0)