logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danko Mannhaupt" <dankol...@mannhaupt.com>
Subject Re: PreparedStatementAppender vs. JDBCAppenderPlus
Date Wed, 28 Apr 2004 14:56:00 GMT
At Wednesday, April 28, 2004 2:40 PM, Ceki Gülcü wrote:
>At 03:35 PM 4/27/2004, Danko Mannhaupt wrote:
>>I think that most users create their own custom logging table with custom
>>columns and types. It is sometimes even required to write custom log
>>objects, not just Strings, to the database. Consequently, IMHO the
>>should offer flexibility and extensibility, at least to provide custom
>>column names.
>Hello Danko,
>Our knowledge on this area is lacking at best and your experience of the
>topic can be very valuable. Could you kindly describe why a user would need
>to have a custom logging table with custom columns and types?

Custom columns refer to particular column names. One reason could be
"enterprise standards" as pointed out before. Sometimes a DBAppender is used
to write trace information that requires column names such as "order_date",
"order_id". I do not think views are a solution as suggested before. Not
every database supports them.

>What can be
>the use of custom message types if no existing tool can display them?

With custom message type I mean for example:
- choose between db datatypes timestamp/date/varchar to store log time
- choose between char/varchar to store messages

In addition, some users want to log data for different columns, for example

/** custom log object class **/
class MyLogObject {public String att1; public String att2; ... }

// log statement
logger.info( new MyLogObject("aaa", "bbb"));

could result in

insert into my_log_table (att1, att2) values ('aaa', 'bbb');

May be that this is beyond the scope of the standard log4j package. I
understand the overall goal to maintain a simple, portable logging package
with similar functions on different platforms.


To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message