Project

General

Profile

Download (11.6 KB) Statistics
| Branch: | Tag: | Revision:
1
#################################################################
2
# P6Spy Options File                                            #
3
# See documentation for detailed instructions                   #
4
#################################################################
5

    
6
#################################################################
7
# MODULES                                                       #
8
#                                                               #
9
# Modules provide the P6Spy functionality.  If a module, such   #
10
# as module_log is commented out, that functionality will not   #
11
# be available.  If it is not commented out (if it is active),  #
12
# the functionality will be active.                             #
13
#                                                               #
14
# Values set in Modules cannot be reloaded using the            #
15
# reloadproperties variable.  Once they are loaded, they remain #
16
# in memory until the application is restarted.                 #
17
#                                                               #
18
#################################################################
19

    
20
module.log=com.p6spy.engine.logging.P6LogFactory
21
#module.outage=com.p6spy.engine.outage.P6OutageFactory
22

    
23
#################################################################
24
# REALDRIVER(s)                                                 #
25
#                                                               #
26
# In your application server configuration file you replace the #
27
# "real driver" name with com.p6spy.engine.P6SpyDriver. This is #
28
# where you put the name of your real driver P6Spy can find and #
29
# register your real driver to do the database work.            #
30
#                                                               #
31
# If your application uses several drivers specify them in      #
32
# realdriver2, realdriver3.  See the documentation for more     #
33
# details.                                                      #
34
#                                                               #
35
# Values set in REALDRIVER(s) cannot be reloaded using the      #
36
# reloadproperties variable.  Once they are loaded, they remain #
37
# in memory until the application is restarted.                 #
38
#                                                               #
39
#################################################################
40

    
41
# oracle driver
42
# realdriver=oracle.jdbc.driver.OracleDriver
43

    
44
# mysql Connector/J driver
45
# realdriver=com.mysql.jdbc.Driver
46

    
47
# informix driver
48
# realdriver=com.informix.jdbc.IfxDriver
49

    
50
# ibm db2 driver
51
# realdriver=COM.ibm.db2.jdbc.net.DB2Driver
52

    
53
# the mysql open source driver
54
#realdriver=org.gjt.mm.mysql.Driver
55
realdriver=com.mysql.jdbc.Driver
56

    
57
#specifies another driver to use
58
realdriver2=
59
#specifies a third driver to use
60
realdriver3=
61

    
62

    
63
#the DriverManager class sequentially tries every driver that is
64
#registered to find the right driver.  In some instances, it's possible to
65
#load up the realdriver before the p6spy driver, in which case your connections
66
#will not get wrapped as the realdriver will "steal" the connection before
67
#p6spy sees it.  Set the following property to "true" to cause p6spy to
68
#explicitily deregister the realdrivers
69
deregisterdrivers=false
70

    
71
################################################################
72
# P6LOG SPECIFIC PROPERTIES                                    #
73
################################################################
74
# no properties currently available
75

    
76
################################################################
77
# EXECUTION THRESHOLD PROPERTIES                               #
78
################################################################
79
# This feature applies to the standard logging of P6Spy.       # 
80
# While the standard logging logs out every statement          #
81
# regardless of its execution time, this feature puts a time   # 
82
# condition on that logging.  Only statements that have taken  # 
83
# longer than the time specified (in milliseconds) will be     #
84
# logged.  This way it is possible to see only statements that #
85
# have exceeded some high water mark.                          #
86
# This time is reloadable.                                     #
87
#
88
# executionthreshold=integer time (milliseconds)
89
#
90
executionthreshold=
91

    
92
################################################################
93
# P6OUTAGE SPECIFIC PROPERTIES                                 #
94
################################################################
95
# Outage Detection
96
#
97
# This feature detects long-running statements that may be indicative of
98
# a database outage problem. If this feature is turned on, it will log any
99
# statement that surpasses the configurable time boundary during its execution.
100
# When this feature is enabled, no other statements are logged except the long
101
# running statements. The interval property is the boundary time set in seconds.
102
# For example, if this is set to 2, then any statement requiring at least 2 
103
# seconds will be logged. Note that the same statement will continue to be logged
104
# for as long as it executes. So if the interval is set to 2, and the query takes
105
# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals).
106
#
107
# outagedetection=true|false
108
# outagedetectioninterval=integer time (seconds)
109
#
110
outagedetection=false
111
outagedetectioninterval=
112

    
113
################################################################
114
# COMMON PROPERTIES                                            #
115
################################################################
116

    
117
# filter what is logged
118
filter=false
119

    
120
# comma separated list of tables to include when filtering
121
include     = 
122
# comma separated list of tables to exclude when filtering
123
exclude     =
124

    
125
# sql expression to evaluate if using regex filtering
126
sqlexpression = 
127

    
128

    
129
# turn on tracing
130
autoflush   = true
131

    
132
# sets the date format using Java's SimpleDateFormat routine
133
dateformat=
134

    
135
#list of categories to explicitly include 
136
includecategories=
137

    
138
#list of categories to exclude: error, info, batch, debug, statement,
139
#commit, rollback and result are valid values
140
excludecategories=info,debug,result,batch
141

    
142

    
143
#allows you to use a regex engine or your own matching engine to determine 
144
#which statements to log
145
#
146
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher
147
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher
148
stringmatcher=
149

    
150
# prints a stack trace for every statement logged
151
stacktrace=false
152
# if stacktrace=true, specifies the stack trace to print
153
stacktraceclass=
154

    
155
# determines if property file should be reloaded
156
reloadproperties=false
157
# determines how often should be reloaded in seconds
158
reloadpropertiesinterval=60
159

    
160
#if=true then url must be prefixed with p6spy:
161
useprefix=false
162

    
163
#specifies the appender to use for logging
164
appender=com.p6spy.engine.logging.appender.Log4jLogger
165
#appender=com.p6spy.engine.logging.appender.StdoutLogger
166
#appender=com.p6spy.engine.logging.appender.FileLogger
167

    
168
# name of logfile to use, note Windows users should make sure to use forward slashes in their pathname (e:/test/spy.log) (used for file logger only)
169
logfile     = D:/eclipse_workspace/p6spy.log
170

    
171
# append to  the p6spy log file.  if this is set to false the
172
# log file is truncated every time.  (file logger only)
173
append=false
174

    
175
#The following are for log4j logging only
176
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
177
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
178
log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n
179

    
180
#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
181
#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
182
#log4j.appender.CHAINSAW_CLIENT.Port=4445
183
#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
184

    
185
log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender
186
log4j.appender.SQLPROFILER_CLIENT.RemoteHost=192.168.1.220
187
#log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost
188
log4j.appender.SQLPROFILER_CLIENT.Port=4445
189
log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true
190

    
191

    
192
#log4j.logger.p6spy=INFO,STDOUT
193
log4j.logger.p6spy=INFO, SQLPROFILER_CLIENT
194

    
195

    
196
#################################################################
197
# DataSource replacement                                        #
198
#                                                               #
199
# Replace the real DataSource class in your application server  #
200
# configuration with the name com.p6spy.engine.spy.P6DataSource,#
201
# then add the JNDI name and class name of the real 		#
202
# DataSource here	            				#
203
#                                                               #
204
# Values set in this item cannot be reloaded using the          #
205
# reloadproperties variable.  Once it is loaded, it remains     #
206
# in memory until the application is restarted.                 #
207
#                                                               #
208
#################################################################
209
#realdatasource=/RealMySqlDS
210
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
211

    
212
#################################################################
213
# DataSource properties                                         #
214
#                                                               #
215
# If you are using the DataSource support to intercept calls    # 
216
# to a DataSource that requires properties for proper setup,    #
217
# define those properties here. Use name value pairs, separate  #
218
# the name and value with a semicolon, and separate the         #
219
# pairs with commas.                                            #
220
# 					                        #
221
# The example shown here is for mysql 	                        #
222
#                                                               #
223
#################################################################
224
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb
225

    
226

    
227
#################################################################
228
# JNDI DataSource lookup                                        #
229
#                                                               #
230
# If you are using the DataSource support outside of an app     #
231
# server, you will probably need to define the JNDI Context     #
232
# environment.                                                  #
233
#                                                               #
234
# If the P6Spy code will be executing inside an app server then #
235
# do not use these properties, and the DataSource lookup will   #
236
# use the naming context defined by the app server.             #
237
#                                                               #
238
# The two standard elements of the naming environment are	#
239
# jndicontextfactory and jndicontextproviderurl. If you need    #
240
# additional elements, use the jndicontextcustom property.      #
241
# You can define multiple properties in jndicontextcustom,      #
242
# in name value pairs. Separate the name and value with a       #
243
# semicolon, and separate the pairs with commas.                #
244
#                                                               #
245
# The example shown here is for a standalone program running on #
246
# a machine that is also running JBoss, so the JDNI context     #
247
# is configured for JBoss (3.0.4).                              #
248
#                                                               #
249
#################################################################
250
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory
251
#jndicontextproviderurl=localhost:1099
252
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces
253

    
254
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory
255
#jndicontextproviderurl=iiop://localhost:900
    (1-1/1)