At the moment, you still have to use Anodyzed as a wrapper around SLF4j, but I'm planning on trying to integrate it better when I get the time. At this point, I don't know when that will be since time always seems too short for all the things I'd like to get done. (*Chris*)
On Wed, Sep 11, 2013 at 3:05 PM, Dario Garcia <[email protected]>wrote: > Hi everyone, > > Does anyone knows if it's possible to use expressions on log variables to > avoid log guarding for costly operations? > > For example, asuming that "receivedObject.getCurrentState()" is a costly > operation, what I'm doing now in my code is something like this: > > > if(LOG.isDebugEnabled()){ > LOG.debug("The received object has invalid state: {}", > receivedObject.getCurrentState() ); > } > > > So I can avoid the cost of that operation when debug isn't enabled. > I would like to have some kind of expressions to avoid the extra IF: > > > LOG.debug("The received object has invalid state: {1.currentState}", > receivedObject) > > > I've seen on previous mail from Chris Pratt that someone suggested the > format from anodyzed, but I couldn't find documentation whether this was > implemented or not : > > "...I would love to merge the formatter from > http://code.google.com/p/anodyzed directly into a pluggable SLF4j..." > > Is this implemented or is it going to be implemented? Are there any > alternatives to what I'm doing? > > Thanks in advance for your responses > > -- > *Darío García* > Agile Software Development > +54 (911) 6336-3707 > *Office: +54 - 011 - 4311-8404* > [email protected] > > _______________________________________________ > slf4j-user mailing list > [email protected] > http://mailman.qos.ch/mailman/listinfo/slf4j-user >
_______________________________________________ slf4j-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/slf4j-user
