spy日志

##################################################################modulelist=com.p6spy.engine.spy.P6SpyFactory,com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory

################################################################# CORE (P6SPY) PROPERTIES                                      #################################################################driverlist=oracle.jdbc.driver.OracleDriver#driverlist=com.mysql.jdbc.Driver#driverlist=org.postgresql.Driver# for flushing per statement# (default is false)#autoflush = false

# sets the date format using Java‘s SimpleDateFormat routine. # In case property is not set, miliseconds since 1.1.1970 (unix time) is used (default is empty)dateformat=yyyy-MM-dd HH:mm:ss:SSS

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

# determines if property file should be reloaded# Please note: reload means forgetting all the previously set# settings (even those set during runtime - via JMX)# and starting with the clean table # (default is false)#reloadproperties=false

# determines how often should be reloaded in seconds# (default is 60)#reloadpropertiesinterval=60

# specifies the appender to use for logging# Please note: reload means forgetting all the previously set# settings (even those set during runtime - via JMX)# and starting with the clean table # (only the properties read from the configuration file)# (default is com.p6spy.engine.spy.appender.FileLogger)#appender=com.p6spy.engine.spy.appender.Slf4JLogger#appender=com.p6spy.engine.spy.appender.StdoutLoggerappender=com.p6spy.engine.spy.appender.FileLogger

# name of logfile to use, note Windows users should make sure to use forward slashes in their pathname (e:/test/spy.log) # (used for com.p6spy.engine.spy.appender.FileLogger only)# (default is spy.log)logfile = logs/spy.log

# append to the p6spy log file. if this is set to false the# log file is truncated every time. (file logger only)# (default is true)append=true

# class to use for formatting log messages (default is: com.p6spy.engine.spy.appender.SingleLineFormat)logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat

# format that is used for logging of the date/time/... (has to be compatible with java.text.SimpleDateFormat)# (default is dd-MMM-yy)databaseDialectDateFormat=yyyy-MM-dd HH:mm:ss:SSS

################################################################## DataSource replacement                                        ##                                                               ## Replace the real DataSource class in your application server  ## configuration with the name com.p6spy.engine.spy.P6DataSource ## (that provides also connection pooling and xa support).       ## then add the JNDI name and class name of the real             ## DataSource here                                               ##                                                               ## Values set in this item cannot be reloaded using the          ## reloadproperties variable. Once it is loaded, it remains      ## in memory until the application is restarted.                 ##                                                               ###################################################################realdatasource=/RealMySqlDS#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource

################################################################## DataSource properties                                         ##                                                               ## If you are using the DataSource support to intercept calls    ## to a DataSource that requires properties for proper setup,    ## define those properties here. Use name value pairs, separate  ## the name and value with a semicolon, and separate the         ## pairs with commas.                                            ##                                                               ## The example shown here is for mysql                           ##                                                               ###################################################################realdatasourceproperties=port;3306,serverName;myhost,databaseName;jbossdb,foo;bar

################################################################## JNDI DataSource lookup                                        ##                                                               ## If you are using the DataSource support outside of an app     ## server, you will probably need to define the JNDI Context     ## environment.                                                  ##                                                               ## If the P6Spy code will be executing inside an app server then ## do not use these properties, and the DataSource lookup will   ## use the naming context defined by the app server.             ##                                                               ## The two standard elements of the naming environment are       ## jndicontextfactory and jndicontextproviderurl. If you need    ## additional elements, use the jndicontextcustom property.      ## You can define multiple properties in jndicontextcustom,      ## in name value pairs. Separate the name and value with a       ## semicolon, and separate the pairs with commas.                ##                                                               ## The example shown here is for a standalone program running on ## a machine that is also running JBoss, so the JDNI context     ## is configured for JBoss (3.0.4).                              ##                                                               ## (by default all these are empty)                              ###################################################################jndicontextfactory=org.jnp.interfaces.NamingContextFactory#jndicontextproviderurl=localhost:1099#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces

#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory#jndicontextproviderurl=iiop://localhost:900

################################################################# P6 LOGGING SPECIFIC PROPERTIES                               #################################################################

# filter what is logged# please note this is a precondition for usage of: include/exclude/sqlexpression# (default is false)#filter=false

# comma separated list of strings to include# please note that special characters escaping (used in java) has to be done for the provided regular expression# (default is empty)#include =# comma separated list of strings to exclude# (default is empty)#exclude =

# sql expression to evaluate if using regex# please note that special characters escaping (used in java) has to be done for the provided regular expression# (default is empty)#sqlexpression = 

#list of categories to exclude: error, info, batch, debug, statement,#commit, rollback and result are valid values# (default is info,debug,result,resultset,batch)#excludecategories=info,debug,result,resultset,batch

# Execution threshold applies to the standard logging of P6Spy.       # While the standard logging logs out every statement          # regardless of its execution time, this feature puts a time   # condition on that logging. Only statements that have taken   # longer than the time specified (in milliseconds) will be     # logged. This way it is possible to see only statements that  # have exceeded some high water mark.                          # This time is reloadable.                                     ## executionthreshold=integer time (milliseconds)# (default is 0)#executionthreshold=

################################################################# P6 OUTAGE SPECIFIC PROPERTIES                                ################################################################## Outage Detection## This feature detects long-running statements that may be indicative of# a database outage problem. If this feature is turned on, it will log any# statement that surpasses the configurable time boundary during its execution.# When this feature is enabled, no other statements are logged except the long# running statements. The interval property is the boundary time set in seconds.# For example, if this is set to 2, then any statement requiring at least 2# seconds will be logged. Note that the same statement will continue to be logged# for as long as it executes. So if the interval is set to 2, and the query takes# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals).## outagedetection=true|false# outagedetectioninterval=integer time (seconds)## (default is false)#outagedetection=false# (default is 60)#outagedetectioninterval=30
时间: 2024-08-08 22:06:24

spy日志的相关文章

Apache配置实现日志按天分割并删除指定几天前的日志

Apache日志默认情况下是一周切割一次,由于访问量大的时候日志的文件还是比较大的,同时也不利于管理员对日志的分析处理.于是尝试对Apache日志设置按天分割,并通过计划任务执行删除几天的日志. 配置文件修改: # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See <

spy++捕获窗口消息

打开spy++,窗口截图如下,点击窗口搜索按钮(红框标识) ,如果找不到对应的窗口,鼠标右键刷新即可. 鼠标左键点击窗口搜索图标,按住不放,拖到需要抓取消息的窗口上: spy++会自动在列表中高亮定位抓取到的窗口,如下图所示,notepad++的new1窗口被抓取到了.再点击菜单栏 监视->日志消息: 在弹窗的消息选项弹窗中,可以选择需要打印的日志的消息,可以通过消息组选择一类消息,也可以在左侧"要查看的消息"中,通过鼠标左键点击选择和取消选择,也可以通过连续按键盘字母键查找对应

格式化p6spy的输出日志

众所周知, p6spy打印出来的日志是一行很长很长的内容, 很不容易查看, 牛B的p6spy为什么就不能想hibernate那样有format_sql的功能? 竟然没有, 我只好自己动手写一个日志输出类, 这里我只举出console日志输出的例子: 1 package com.techmango.higenericdao.utils; 2 3 import com.p6spy.engine.spy.appender.StdoutLogger; 4 5 public class P6SpyStdo

&lt;Win32&gt; 使用钩子仿照Spy++截取消息

1. 钩子 钩子是Windows留给我们的后门.对消息进行过滤,比方快捷键,程序监控键盘,获取键盘动作,再进行判断. 详细的前往:http://blog.csdn.net/sunears/article/details/1861568 2. 钩子用法 添加钩子:SetWindowsHookEx HHOOK WINAPI SetWindowsHookEx( _In_ int idHook, _In_ HOOKPROC lpfn, _In_ HINSTANCE hMod, _In_ DWORD dw

配置p6spyLog输出sql完整日志

第一步: 配置maven <dependency> <groupid>p6spy</groupid> <artifactid>p6spy</artifactid> <version>3.6.0</version> </dependency> <dependency> <groupid>com.alibaba</groupid> <artifactid>druid&

0216 aop和打印数据库执行日志

需求 maven依赖 <dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>3.8.7</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>gua

winform学习日志(二十三)---------------socket(TCP)发送文件

一:由于在上一个随笔的基础之上拓展的所以直接上代码,客户端: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Net.Sockets; using Sys

MySQL binlog日志恢复数据

我们了解了MySQL 的 binlog 日志的开启方式以及 binlog 日志的一些原理和常用操作,我们知道,binlog 有两大作用,一个是使用 binlog 恢复数据,另一个就是用来做主从复制.本篇笔记就是来记录如何使用 binlog 日志来做数据恢复.当然了,使用 binlog 日志所恢复的数据只能是部分数据,并不能够使用 binlog 日志来做数据库的备份,如果想要做数据库备份,依然要使用我们传统的备份方法,而 binlog 可以作为增量备份. 视频链接:http://www.ronco

sparkStreaming结合sparkSql进行日志分析

package testimport java.util.Propertiesimport org.apache.spark.SparkConfimport org.apache.spark.SparkContextimport org.apache.spark.sql.{SQLContext, SaveMode}import org.apache.spark.streaming.Secondsimport org.apache.spark.streaming.StreamingContext