Hi,

I am trying to using chainsaw to monitor logs that we insert into our 
database (oracle db).  I created the file below and launched chainsaw.  I 
manually pointed chainsaw to this config file.  The receiver shows up; 
however, nothing happens.  I get no errors and I get no tab for the 
receiver.  I did notice that the refreshMillis is different in the 
properties in the chainsaw gui than in the file below.  In addition, the 
connectionSource is blank.

Can you give me an idea of what I am doing wrong?

In addition, the sql below has issues in oracle because level is a key 
word in oracle.  Does DBReceiver require the field be aliased as LEVEL? If 
so, how would I get around the key word issue.

Also, is there a way that upon start up, this receiver would get loaded 
automatically?

Thanks.


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
   <plugin name="MyDBReceiver" class="org.apache.log4j.db.DBReceiver">
      <connectionSource 
class="org.apache.log4j.db.DriverManagerConnectionSource">
        <param name="driverClass" 
value="oracle.jdbc.driver.OracleDriver"/>
        <param name="password" value="blah"/>
        <param name="user" value="blah"/>
        <param name="url" value="jdbc:oracle:thin:@blah:1521:blah"/>
      </connectionSource>
     <param name="refreshMillis" value="3000"/>
     <param name="sql" value="SELECT log_id as ID, line as LINE, 
application as APPLICATION, log_level as LEVEL, message as MESSAGE, 
hostname as HOSTNAME, src_file as FILE, stack as THREAD, log_time as 
TIMESTAMP, '' AS NDC, '' AS MDC, '' AS CLASS, '' AS METHOD, 
CONCAT(USER_ID||' '||CATEGORY||' '||log4jid) AS PROPERTIES, '' AS 
EXCEPTION from bu_log order by TIMESTAMP desc, APPLICATION"/>
   </plugin>
   <root>
      <level value="debug"/>
   </root>
</log4j:configuration>

Reply via email to