logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Womack" <mwom...@apache.org>
Subject Re: Persisting LoggingEvents across languages
Date Tue, 18 May 2004 03:06:27 GMT
Is there anyway that the database table/structure could be definable instead
of fixed and still have decent performance?  I am probably not knowledgeable
about all the db related issues, but I think that previous experience shows
that having fixed/hardcoded stuff around database related code will not be
as useful long term.

That being said, I'd rather see high performance around the db insertions
than paying a high price for the flexibility, and I would rather see a
simple set working than have all the knobs one might want.

just 2 cents,

----- Original Message ----- 
From: "Ceki Gülcü" <ceki@qos.ch>
To: <general@logging.apache.org>
Sent: Wednesday, April 28, 2004 5:31 AM
Subject: Persisting LoggingEvents across languages

Hi all,

For log4j 1.3, I would like DBAppender, i.e. the successor to JDBCAppender,
to be able to persist to a database in a format independent of the Java

For most fields this is not a problem except for the MDC (a map),
properties (a map) and exceptions (an array of type string).

I am thinking of persisting each of these multi-valued fields into their
own table. Thus, there will be a table for LoggingEvents containing most
fields except for the throwable, MDC and properties.
The MDC field will be stored in its own table, consisting of a foreign key
to the owning LoggingEvent instance, a column for the key and a column for
the value. Each row in the MDC table will correspond to one (value,key)
pair in an MDC instance. The throwable would also be stored in its own
table, with each row corresponding to a line in the stack trace. The
properties map will be stored in the same way as the MDC.

The advantage over java object serialization is that none of the fields
would be opaque for the database and also programming language independent.
Thus, one would be able to perform SQL queries on the MDC or the
properties. (Give me all the events for userid=john).

Do log4cxx, log4net, or log4pgp support persistence of logging events into
a db? Should we work on this in a coordinated fashion?

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp

View raw message