Re: JDBC Logging & log4j

Поиск
Список
Период
Сортировка
От Peter V Cooper
Тема Re: JDBC Logging & log4j
Дата
Msg-id 5.1.0.14.0.20020317073009.00af0878@mail.dc3.adelphia.net
обсуждение исходный текст
Ответ на JDBC Logging & log4j  ("Dave Cramer" <Dave@micro-automation.net>)
Ответы Re: JDBC Logging & log4j  ("Dave Cramer" <Dave@micro-automation.net>)
Список pgsql-jdbc
I would vote no on mandatory driver logging.  Maybe one could construct a
comment based stub which would have a utility run against the code to include
the debugging code much like a real pre-compiler. This seems problematical
and less desirable IMHO to just dealing with the logs in the backend
for support purposes. By default I would hope the driver is not burdened
extensive and expensive logging code. I guess it depends on what
a persons need is. I prefer the simplicity we have now. Of course I am
not a source contributor so I may be out of line in my suggestions.

BTW, if driver logging was included I would probably stay on the previous
release and eventually write a utility to strip it out especially if it
required
a bunch of  perl modules. I went to java servlets to be rid of perl. Perl may
be fun to write and I like it personally but it is too wierd for many in my
organization.

Just one voice.

At 04:15 PM 3/16/2002 -0500, Dave Cramer wrote:
>A number of people have asked about logging in the driver, and
>specifically about the use of log4j.
>
>There are a number of issues with this.
>
>1) It means that we have to have another jar, and likely include in the
>distribution. For folks that don't use java this is a burden. Think of
>it this way, do you want to download a bunch of perl modules with the
>driver so you can use jdbc?
>
>2) log4j uses a propery file to load it's configuration and it seems
>there are some *very* creative ways to load database drivers out there
>which do not load the log4j properties correctly.
>
>3) Regardless of how fast log4j is or isn't it is still will slow the
>driver down. And as Hans pointed out java has no preprocessing so we
>either get logging in there or not.
>
>4) log4j does facilitate changing the loglevel at runtime instead of
>compile time, but we still run into issues where we have to create a
>string object to log whereas now we don't so code like:
>
>         foo(getInfofrombackend())
>
>Becomes
>
>         String msg = getInfofrombackend();
>         logger.debug(msg);
>         foo(msg);
>
>So the question is:
>
>Do we want to put logging in the driver?
>Why?
>How much?
>At what cost?
>
>I have given some thought to question 1) above and we could use a
>pluggable logger so that log4j could be used if configured or, there
>would be a default logger. However this would only slow things down even
>more.
>
>Dave
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "otisg"
Дата:
Сообщение: Re: JDBC Logging & log4j
Следующее
От: Charlie Kelly
Дата:
Сообщение: Newbie Questions