Thanks. I did finally get it to sort by using a sub query. In case anyone is interested in how to set up a custom db receiver for Oracle this is what I used. It still gets everything on an update and not just the new events so I'll look at the code and see why it might be doing that.
<plugin name="MyDBReceiver" class="org.apache.log4j.db.CustomSQLDBReceiver"> <connectionSource class="org.apache.log4j.db.DriverManagerConnectionSource"> <param name="password" value="<password>"/> <param name="user" value="<id>"/> <param name="driverClass" value="oracle.jdbc.driver.OracleDriver"/> <param name="url" value="jdbc:oracle:thin:@<server>:<port>:<instance>"/> </connectionSource> <param name="refreshMillis" value="5000"/> <param name="sql" value="select * from (select counter as counter, logger as LOGGER, date_stamp as "TIMESTAMP", priority as "LEVEL", '-' as "THREAD", message as MESSAGE, '' as NDC, '' as MDC, '' as CLASS, '' as "METHOD", '' as "FILE", '' as "LINE", '{{application, CiT,hostname, 116, log4jid,' || CAST(COUNTER AS varchar(255)) || '}}' as "PROPERTIES", 'host' as hostname, 'app' as application, '' as "EXCEPTION" FROM LOG4J order by counter)"/> <param name="IDField" value="COUNTER"/> <param name="refreshMillis" value="0"/> </plugin> -----Original Message----- From: Scott Deboy [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 1:55 PM To: Log4J Users List Subject: RE: CustomSQLDBReceiver not working correctly. Where can I find the code for it? The SVN repository was down for a couple of days. Here's a link to the latest revision of CustomSQLDBReceiver. As always, patches are always appreciated! http://svn.apache.org/viewcvs.cgi/logging/log4j/trunk/src/java/org/apach e/log4j/db/CustomSQLDBReceiver.java?view=markup Scott -----Original Message----- From: Mostrom, Edward [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:13 PM To: log4j-user@logging.apache.org Subject: CustomSQLDBReceiver not working correctly. Where can I find the code for it? I am using Chainsaw v2 alpha 1 connecting to an Oracle 10g database. I am getting events back; but every time it refreshes it gets them all again instead of just the new ones. Looks like it is ignoring the IDField param for the sql. It is apparently looking at the IDField because it will complain if I don't have it set or have it set to a field that is not a number... But it is not using it in the sql. It is also not sorting by that field so the events come back in a strange order. There are some other minor oddities - but I can live with them. Is there any place where I can get the code for it so I can make one that works for me? Didn't see it anywhere in the svn depot. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]