> Yes, but I'm not sure what the change is off-hand.

Found it.  See:
http://avalon.apache.org/api/org/apache/avalon/excalibur/logger/factory/JDBC
TargetFactory.html

It appears that you add:

  <jdbc id="database">
    <datasource>java:/LogTargetDataSource</datasource>
    <normalized>true</normalized>
    <table name="LOG">
      <category>CATEGORY</category>
      <priority>PRIORITY</priority>
      <message>MESSAGE</message>
      <time>TIME</time>
      <rtime>RTIME</rtime>
      <throwable>THROWABLE</throwable>
      <hostname>HOSTNAME</hostname>
      <static aux="-">STATIC</static>
      <context aux="principal">PRINCIPAL</context>
      <context aux="ipaddress">IPADDRESS</context>
      <context aux="username">USERNAME</context>
    </table>
  </jdbc>

and then point logs at the database target instead of one of the file
targets.

You would need to define an appropriate datasource in config.xml, and
probably pre-define the table.  Unfortunately, you'll probably need to read
the source code to figure it all out.

        --- Noel

-----Original Message-----
From: Scherer Pierre [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 14, 2003 6:10
To: James
Subject: Log into a DB

Hi,

How can I put the informations catch by logger defines in the assembly file
into a DB (I use MySQL with windows)?

Have a nice day,

-Pierre


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to