Return-Path: Delivered-To: apmail-logging-general-archive@www.apache.org Received: (qmail 17185 invoked from network); 28 Apr 2004 12:31:46 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Apr 2004 12:31:46 -0000 Received: (qmail 32743 invoked by uid 500); 28 Apr 2004 12:31:44 -0000 Delivered-To: apmail-logging-general-archive@logging.apache.org Received: (qmail 32690 invoked by uid 500); 28 Apr 2004 12:31:43 -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 32674 invoked from network); 28 Apr 2004 12:31:43 -0000 Received: from unknown (HELO mail.qos.ch) (80.238.41.184) by daedalus.apache.org with SMTP; 28 Apr 2004 12:31:43 -0000 Received: from kal.qos.ch (kal [192.168.1.3]) by mail.qos.ch (Postfix) with ESMTP id 40F121EC1CF for ; Wed, 28 Apr 2004 14:34:42 +0200 (CEST) Message-Id: <6.0.3.0.0.20040428141411.01e014d0@mail.qos.ch> X-Sender: ceki@mail.qos.ch (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.3.0 Date: Wed, 28 Apr 2004 14:31:45 +0200 To: general@logging.apache.org From: Ceki =?iso-8859-1?Q?G=FClc=FC?= Subject: Persisting LoggingEvents across languages Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable 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 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=20 own table. Thus, there will be a table for LoggingEvents containing most=20 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://www.qos.ch/shop/products/clm_t.jsp =20