Pierre,
As I told you before, I haven't tried using database logging. If the
information below isn't sufficient, you'll have to ask on the Avalon mailing
list.
One problem may be that you said that you are looking for TargetFactory.
The correct class is JDBCTargetFactory.
--- Noel
-----Original Message-----
From: Scherer Pierre [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 23, 2003 19:12
To: James Users List
Subject: RE: Log into a DB
Is it possible to change this code in the source version of james?
Because I have find the .class but not the java file of TargetFactory.
Must I re-compile Phoenix after (perhaps, will it be more easy to use Log4J
directly in the maillets?) and before compile back james?
When you write :" You would need to define an appropriate datasource in
config.xml, ..."
Is it the same operation that you do for use DB with repertory or are you
talking about anything else?
Thanks Noel
-Pierre
-----Message d'origine-----
De : Noel J. Bergman [mailto:[EMAIL PROTECTED]
Envoy� : vendredi 14 f�vrier 2003 19:18
� : James Users List
Objet : RE: Log into a DB
> 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]