logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Next alpha release
Date Wed, 19 Oct 2005 14:08:17 GMT

On Oct 19, 2005, at 8:03 AM, Rakesh Patel wrote:


> Hi,
>
> Been hearing about an imminent alpha 7 release for a few weeks now.  
> Any
> news?
>
> There have been a lot of changes from 1.2 to 1.3. The only reason I
> opted for 1.3 is because of the ("some data {}", value) functionality.
> Is it possible to retrofit that into 1.2? Moving to 1.3 seems quite
> painful with all the changes.
>
> Cheers
>
> Rakesh
>

In http://marc.theaimsgroup.com/?l=log4j-dev&m=112917692022155&w=2,  
Mark Womack provided a build for consideration to the log4j-dev list  
and the PMC as a candidate to be 1.3 alpha 7.  It isn't a release  
since there hasn't been a vote yet and the eventual 1.3 alpha 7 may  
be different (and may likely be due to bug 37122).  However, if you  
want to download the build and provide feedback, feel free.

One of the reasons that we are still calling 1.3 an alpha is the API  
is subject to change and an systematic review of all the API changes  
between 1.2 and 1.3 will be undertaken before freezing the API.  I'm  
not particularly fond of the particular way that formatting was  
integrated in 1.3 and believe that using an independent logging  
formatter class would result in equivalent performance and allow the  
user to choose his formatter.  The JDK provides other formatters  
other than MessageFormat and the current log4j 1.3 doesn't implement  
all of MessageFormat.

For example:

logger.debug("some data {}", value);

written using an external formatter would look like:

MessageFormatter.debug(logger, "some data {}", value);

The implementation of MessageFormatter would look something like:

public class MessageFormatter {
     private MessageFormatter() {}
     public static void debug(final Logger logger, final String fmt,  
final Object param1) {
         if (logger.isDebugEnabled()) {
            logger.debug(MessageFormat.format(fmt, new Object[]  
{ param1 }));
         }
     }
     //  repeated for other permutations
}

You could write a class for your own use now that would work with  
either log4j 1.3 or log4j 1.2.



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


Mime
View raw message