[infinispan-dev] Reminder on trickiness for guarding against log trace

Emmanuel Bernard emmanuel at hibernate.org
Wed Feb 22 20:04:14 EST 2012


And we all agree that boxing animals is pure cruelty. 

On 22 févr. 2012, at 19:16, Sanne Grinovero <sanne at infinispan.org> wrote:

> It's easy to be fooled by the nice looking tracef API; can you see
> what's wrong with the next method?
> 
> log.tracef("%s: Committing view %s", cacheName, viewId);
> 
> 
> [solution below]
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The signature for such a tracef method is
> tracef(String format, Object param1, Object param2);
> so integers, booleans, etcetera.. will be boxed into objects.
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev



More information about the infinispan-dev mailing list