duplicated logs

Help
deeeed
2010-06-05
2013-04-25
  • deeeed
    deeeed
    2010-06-05

    I just installed p6spy and everything seems to work well except all my requests are duplicated in the log:
    For instance, I only do a single request and in the log I can see:
    1275696381380|261|1|statement||SELECT * FROM WEB.CATEGORY_TBL ORDER BY "depth",parent_uuid
    1275696381383|264|2|statement||SELECT * FROM WEB.CATEGORY_TBL ORDER BY "depth",parent_uuid
    1275696381399|-1||resultset|SELECT * FROM WEB.CATEGORY_TBL ORDER BY "depth",parent_uuid |
    1275696381399|-1||resultset|SELECT * FROM WEB.CATEGORY_TBL ORDER BY "depth",parent_uuid |

    1275696381407|-1||resultset|SELECT * FROM WEB.CATEGORY_TBL ORDER BY "depth",parent_uuid |

    So, one single request generated 62 lines of logs.

    Here is my spy.properties:

    module.log=com.p6spy.engine.logging.P6LogFactory
    #module.outage=com.p6spy.engine.outage.P6OutageFactory
    realdriver=com.ibm.db2.jcc.DB2Driver
    executionthreshold=
    outagedetection=false
    outagedetectioninterval=
    # comma separated list of tables to include
    include =
    # comma separated list of tables to exclude
    exclude =
    # sql expression to evaluate if using regex
    sqlexpression =
    # filter what is logged
    filter=false
    # turn on tracing
    trace = true
    autoflush = true
    # sets the date format using Java's SimpleDateFormat routine
    dateformat=
    #list of categories to explicitly include
    includecategories=
    #list of categories to exclude: error, info, batch, debug, statement,
    #commit, rollback and result are valid values
    #excludecategories=
    excludecategories=info,debug,result,batch
    #allows you to use a regex engine or your own matching engine to determine
    #which statements to log
    #
    #stringmatcher=com.p6spy.engine.common.GnuRegexMatcher
    #stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher
    stringmatcher=
    # 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
    reloadproperties=false
    # determines how often should be reloaded in seconds
    reloadpropertiesinterval=60
    #if=true then url must be prefixed with p6spy:
    useprefix=false
    appender=com.p6spy.engine.logging.appender.FileLogger
    logfile=/home/tomcat/tomcat/logs/spy.log
    append=true
    

    Any suggestions on what could be wrong ?

     
  • deeeed
    deeeed
    2010-06-05

    Ok, so I checked the bug tracker and this seems to be a known issue.
    The resultset is not filtered… https://sourceforge.net/tracker/?func=detail&aid=1005989&group_id=49288&atid=455698
    Any workaround ? Maybe I can find a patched jar somewhere ?
    Last option would be to patch it myself but since this bug is from many yearsss ago I guess there some other ways..

     
  • Pat
    Pat
    2010-12-28

    Hi there -

    Sorry for the late response. I think I am the only one who has recently done anything with p6spy. I got some basic access to this project from the only original developer I could reach. Unfortunately, not full project admin access. So I have moved over to github for further development.

    You are welcome to help out there by forking and then sending me a pull request.

    https://github.com/patmoore/p6spy