Going through DBAppender in log4j1.3-alpha6, the database looks like
this:
sequence_number BIGINT NOT NULL,
timestamp BIGINT NOT NULL,
rendered_message TEXT NOT NULL,
logger_name VARCHAR(254) NOT NULL,
level_string VARCHAR(254) NOT NULL,
ndc TEXT,
thread_name VARCHAR(254),
reference_flag SMALLINT,
caller_filename VARCHAR(254) NOT NULL,
caller_class VARCHAR(254) NOT NULL,
caller_method VARCHAR(254) NOT NULL,
caller_line CHAR(4) NOT NULL,
event_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
But, the documentation for CustomSQLDBReceiver (both log4j1.3-alpha6 and
recent chainsaw-bundle) gives an example to read the DB like this:
* <p>
* select logger as LOGGER, timestamp as TIMESTAMP, level as LEVEL,
thread as
* THREAD, message as MESSAGE, ndc as NDC, mdc as MDC, class as CLASS,
method as
* METHOD, file as FILE, line as LINE,
* concat("{{application,databaselogs,hostname,mymachine, log4jid,",
* COUNTER,"}}") as PROPERTIES, "" as EXCEPTION from logtable
* <p>
LOGGER, TIMESTAMP, LEVEL, THREAD..NDC...CLASS,METHOD,FILE,LINE match up,
but the MESSAGE,MDC,PROPERTIES (the fields to concat) do not match up.
With the CustomSQLDBReceiver for Chainsaw you could leave MESSAGE, MDC,
and PROPERTIES blank -- the question becomes is that good practice.
Was this configuration between the DBAppender and the (Chainsaw)
CustomSQLDBReciever intentional?
-D
> -----Original Message-----
> From: Darren Hartford [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 13, 2005 2:12 PM
> To: Log4J Users List
> Subject: Log4j 1.3 DBAppender and ChainsawV2
>
> Hey all,
> Probably jumping the gun a little bit, but is there an
> example of how to setup a Log4j (1.3alpha) Appender to log to
> a database in a format that can be used by
> Chainsaw...followed by how to setup Chainsaw to use the database?
>
> I see a lot of information regarding the SocketAppenders, but
> not a lot for DB-based logging.
>
> TIA, looking forward to a full log4j/chainsaw
> UI/persisted-in-db logging environment!
> -D
>
>
> ---------------------------------------------------------------------
> 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]