I do not have that much knowledge of the JDBC targets in LogKit but -
If you have a look in Excalibur at class
org.apache.avalon.excalibur.logger.factory.JDBCTargetFactory you will find
some code that does all this for you.
Then you could attack your problem 2 ways:
(1) Instantiate the factory class, create a class that implements
"Configuration" (and set up the configuration) and the factory class will
do the rest. This might be useful if you are manually creating the various
loggers; OR
(2) (If you are using the XML configuration file), simply create the XML
representation of the JDBC Target. The javadoc at the top of the class
shows how to set it up.
I have not done either as my application only required flat file output but
(2) is more powerful and (I assume) the way that most people use logkit
logging.
"NGUYEN LIEM (APP1LXN)" <[EMAIL PROTECTED]> on 23/09/2003 07:20:24
Please respond to "Avalon framework users" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: RE: Need help on Avalog's Logkit
Berin Loritsch,
I have a Target which writes to log file. Now, I would like to have another
Target to write to database. To create a target to write to database, I
have
to create a DefaultJDBCTarget or NormalizedJDBCTarget object. If it's
correct, than I have to create an array of ColumnInfo and pass this array
to
DefaultJDBCTarget or NormalizedJDBCTarget's constructor . My problem is how
to map the information available at that time (for example: priority, time,
context:*, message .etc...) to each column in my table.
Thanks a lot.
Liem
****************************************************************
NOTICE - This message is intended only for the use of the
addressee named above and may contain privileged and
confidential information. If you are not the intended recipient
of this message you are hereby notified that you must not
disseminate, copy or take any action based upon it. If you
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.
****************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]