You have a good point but since this the (infamous) trace level we're talking about isn't it ok? I fully expect to be able to unplug my trace-enabled jar and plug in the new logj4 1.3 jar when it is available for production, if I understand correctly that Logger.trace() and Logger.isTraceEnabled() are in there. In effect I have modified log4j 1.2.9 to include these new methods so when 1.3 comes around my code which uses logger.isTraceEnabled and logger.trace() won't have to be reworked nor will I need to change my configuration as there is no custom logger. I'll just swap the log4j-1.2.9.jar for log4j-1.3.x.jar.

----- Original Message ----- From: "Lutz Michael" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.log4j.user
Sent: Monday, April 04, 2005 7:38 AM
Subject: RE: log4j trace enabled version




you shouldn't modify Log4j to add new levels. It's not optimal in general to modify Log4j because it will make it more difficult to upgrade as new releases occur.

To add levels extend the Level class, and specify your class in your config
XML, for example:


<!-- Example of a logger for a specific class that overrides the
root logger -->
<logger name="com.org.WhateverClass">
<level class="com.org.MyNewLogLevel" value="SOME_NEW_LEVEL"
/>
</logger>

see http://logging.apache.org/log4j/docs/api/org/apache/log4j/Level.html


-----Original Message----- From: Peter DeGregorio [mailto:[EMAIL PROTECTED] Sent: Monday, April 04, 2005 7:28 AM To: Log4J Users List Subject: Re: log4j trace enabled version


Thank you developers for adding trace. But it isn't "readily available" from


what I can tell so far, which my question specified. Regarding what
developers have decided to do or not do, did it ever occur to you that the
log4j users list would be a good place to reveal that trace is added even to


the limited extent it has been? While I did not search the developer list I
did scan 10,000 message subjects here and there is not a single word about
trace being sort of available, until now that is.


Regarding the Ceki G. very good book, I had already purchased it and worked
through the mentioned chapter on extending log4j however, it did not meet my


requirements for a built-in trace level. So, I modified log4j myself, which
fortunately was not hard to do. I initially had trouble compiling log4j
unmodified and, actually, asked a question on the developer list about that
which was ignored. I don't have a jms.jar and don't know how to get one
easily so all of the classes don't get built. My modification seems to work
fine but I am neither qualified nor inclined to become a log4j developer so
I asked the question here about whether there is a readily available log4j
modification with trace. I don't think that requiring people who want a jar
with Logger.trace() and Logger.isTraceEnabled() built in to modify log4j
themselves especially with hard-to-find jars necessary to get a full build
qualifies as "readily available".


I am happy to share my modification with anyone who requests it, source
code, prebuilt jar (jdk 1.4; it won't do java message service related stuff
unless you build it yourself with jms.jar) and how-to-build instructions
included but I'm sure this would be better if it came from a qaulified log4j


developer.

Peter

----- Original Message ----- From: "Andy McBride" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.log4j.user
Sent: Sunday, April 03, 2005 4:05 PM
Subject: RE: log4j trace enabled version



You don't need to look at CVS to find what you are looking for.

A search of the log4j-dev mailing list would have revealed many posts over
the past year which answered your question. Perhaps you should look there
before making remarks regarding what the log4j committers have and have
not
decided to do.


A vote was taken on adding the trace level and the functionality you
desire
has already been added to the forthcoming log4j 1.3 release.

Andy


-----Original Message-----
From: Peter DeGregorio [mailto:[EMAIL PROTECTED]
Sent: 03 April 2005 20:26
To: log4j-user@logging.apache.org
Subject: Re: log4j trace enabled version

I did do my research, thank you very much. Plenty of it. This stuff you
sent is buried somewhere in a CVS server evidently. What research would
reveal this? This is not an idle question, the links you sent me are not
complete ... a modification to Level is required also and I don't know
how
to find that.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-------------------------------------------------------------------------------
This message and any included attachments are from Siemens Medical Solutions
USA, Inc. and are intended only for the addressee(s).
The information contained herein may include trade secrets or privileged or
otherwise confidential information. Unauthorized review, forwarding, printing,
copying, distributing, or using such information is strictly prohibited and may
be unlawful. If you received this message in error, or have reason to believe
you are not authorized to receive it, please promptly delete this message and
notify the sender by e-mail with a copy to [EMAIL PROTECTED]


Thank you


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to