Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   Help & Support (https://www.gnutellaforums.com/help-support/)
-   -   Search QueriesLog? (https://www.gnutellaforums.com/help-support/92451-search-querieslog.html)

writetreatage June 7th, 2009 04:20 AM

Search QueriesLog?
 
Is it possible to log the incoming search queries in Phex 3.4.xx.xx? I thought a line in the phex.cfg file of the following might work:

searchMonitorFile=C\:\\phex\\query.log

Any suggestions? :xirokrotima:

GregorK June 8th, 2009 12:28 AM

The concept was changed. But the functionality is still available you just need to hook it into the code by yourself.
Here is some example code blog:

Code:

    File file = new File( "/phex/query.log" );
    File parent = file.getParentFile();
    if ( parent != null )
    {
        parent.mkdirs();
    }
    file.createNewFile();
    fileWriter = new FileWriter( file.getAbsolutePath(), true );
    QueryMsgToWriterMonitor monitor = new QueryMsgToWriterMonitor( fileWriter );
    Servent.getInstance().getMessageService().addMessageSubscriber(
                    QueryMsg.class, monitor );

Also check out QueryMsgToWriterMonitor.java in SVN:
SourceForge.net Repository - [phex] View of /phex/trunk/src/main/java/phex/query/QueryMsgToWriterMonitor.java

Gregor

rsgrady June 11th, 2009 07:47 PM

Where would this code snippet be added?

Does this require recompilation?

The link you listed for additional info is broken.

GregorK June 14th, 2009 02:43 PM

You could add it to the phex.query.QueryManager constructor line 79

Yes you need to recompile.

The link should work, try it again may SF had a downtime.


All times are GMT -7. The time now is 05:24 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.