From general-return-243-apmail-logging-general-archive=logging.apache.org@logging.apache.org Tue May 18 03:06:39 2004 Return-Path: Delivered-To: apmail-logging-general-archive@www.apache.org Received: (qmail 11616 invoked from network); 18 May 2004 03:06:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 May 2004 03:06:39 -0000 Received: (qmail 23801 invoked by uid 500); 18 May 2004 03:07:11 -0000 Delivered-To: apmail-logging-general-archive@logging.apache.org Received: (qmail 23744 invoked by uid 500); 18 May 2004 03:07:10 -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 23693 invoked by uid 98); 18 May 2004 03:07:10 -0000 Received: from mwomack@apache.org by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(66.163.170.80):. Processed in 0.02673 secs); 18 May 2004 03:07:10 -0000 X-Qmail-Scanner-Mail-From: mwomack@apache.org via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(66.163.170.80):. Processed in 0.02673 secs) Received: from unknown (HELO smtp810.mail.sc5.yahoo.com) (66.163.170.80) by hermes.apache.org with SMTP; 18 May 2004 03:07:09 -0000 Received: from unknown (HELO hogwarts) (m-m-womack@sbcglobal.net@68.124.18.235 with login) by smtp810.mail.sc5.yahoo.com with SMTP; 18 May 2004 03:06:25 -0000 Message-ID: <005e01c43c85$1f2d0ea0$6401a8c0@hogwarts> From: "Mark Womack" To: "Logging General" References: <6.0.3.0.0.20040428141411.01e014d0@mail.qos.ch> Subject: Re: Persisting LoggingEvents across languages Date: Mon, 17 May 2004 20:06:27 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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, -Mark ----- Original Message ----- From: "Ceki Gülcü" To: 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 language. 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