From general-return-223-apmail-logging-general-archive=logging.apache.org@logging.apache.org Wed Apr 28 21:05:59 2004
Return-Path:
Delivered-To: apmail-logging-general-archive@www.apache.org
Received: (qmail 57408 invoked from network); 28 Apr 2004 21:05:59 -0000
Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12)
by minotaur-2.apache.org with SMTP; 28 Apr 2004 21:05:59 -0000
Received: (qmail 88082 invoked by uid 500); 28 Apr 2004 21:05:47 -0000
Delivered-To: apmail-logging-general-archive@logging.apache.org
Received: (qmail 88063 invoked by uid 500); 28 Apr 2004 21:05:46 -0000
Mailing-List: contact general-help@logging.apache.org; run by ezmlm
Precedence: bulk
list-help:
list-unsubscribe:
list-post:
Reply-To: "Logging General"
Delivered-To: mailing list general@logging.apache.org
Received: (qmail 88049 invoked from network); 28 Apr 2004 21:05:46 -0000
Received: from unknown (HELO pdxcorp1.vwsnet.com) (128.241.65.66)
by daedalus.apache.org with SMTP; 28 Apr 2004 21:05:46 -0000
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
Content-Class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----_=_NextPart_001_01C42D64.970B279C"
Subject: RE: Persisting LoggingEvents across languages - DTD questions
Date: Wed, 28 Apr 2004 14:05:52 -0700
Message-ID: <984A7225EFC7FD44B0B66D3A29A144000617D7@pdxcorp1.vwsnet.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator: <984A7225EFC7FD44B0B66D3A29A144000617D7@pdxcorp1.vwsnet.com>
Thread-Topic: Persisting LoggingEvents across languages
Thread-Index: AcQtHMe8bzb/OtrESR2vcjSYtCrDQAARR4Lp
From: "Scott Deboy"
To: "Logging General"
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N
This is a multi-part message in MIME format.
------_=_NextPart_001_01C42D64.970B279C
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
On a related note, is it time to promote log4j's DTD as the =
cross-language DTD (and rename it), since log4cxx and log4net, log4php, =
log4perl all support the DTD?
I would also like to discuss the most recent change to the DTD to add =
sequence number support to event as a required attribute.
Is it the case that this sequence number will always be set and have a =
useful value?
I'm not sure who will be setting the sequence number - if they're using =
a DB appender, the sequence number will exist, but only in the database, =
correct? Will this sequence number be 0 in other cases? is it the =
responsibility of the appender to set it? If it's zero everywhere =
except when retrieving the sequence number from the database, is it =
worth adding to the DTD?
Chainsaw V2 relies on a similar mechanism, but uses a 'log4jid' property =
as the identifier. If the property doesn't exist when it's received, =
the property is added. Building a namespace of properties seems odd as =
well, but would be more flexible than modifying the DTD to support new =
features that were used by a subset of the events.
If the user is logging to a database and a file, and the database is the =
source of the sequence number when it's sent to the database, would the =
file have a different sequence number? =20
Scott
-----Original Message-----
From: Ceki G=FClc=FC [mailto:ceki@qos.ch]
Sent: Wed 4/28/2004 5:31 AM
To: general@logging.apache.org
Cc:=09
Subject: Persisting LoggingEvents across languages
Hi all,
For log4j 1.3, I would like DBAppender, i.e. the successor to =
JDBCAppender,=20
to be able to persist to a database in a format independent of the Java=20
language.
For most fields this is not a problem except for the MDC (a map),=20
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=20
to the owning LoggingEvent instance, a column for the key and a column =
for=20
the value. Each row in the MDC table will correspond to one (value,key)=20
pair in an MDC instance. The throwable would also be stored in its own=20
table, with each row corresponding to a line in the stack trace. The=20
properties map will be stored in the same way as the MDC.
The advantage over java object serialization is that none of the fields=20
would be opaque for the database and also programming language =
independent.=20
Thus, one would be able to perform SQL queries on the MDC or the=20
properties. (Give me all the events for userid=3Djohn).
Do log4cxx, log4net, or log4pgp support persistence of logging events =
into=20
a db? Should we work on this in a coordinated fashion?
--=20
Ceki G=FClc=FC
For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://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