<div dir="ltr">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.<div>

  (*Chris*)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 11, 2013 at 3:05 PM, Dario Garcia <span dir="ltr"><<a href="mailto:dario.garcia@10pines.com" target="_blank">dario.garcia@10pines.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>Does anyone knows if it's possible to use expressions on log variables to avoid log guarding for costly operations?<br>

</div><div><br></div><div>For example, asuming that "receivedObject.getCurrentState()" is a costly operation, what I'm doing now in my code is something like this:</div>

<div><br></div><div><br></div><div>if(LOG.isDebugEnabled()){</div><div>   LOG.debug("The received object has invalid state: {}", receivedObject.getCurrentState() );<br></div><div>}</div><div><br></div><div><br>


</div>
<div>So I can avoid the cost of that operation when debug isn't enabled.</div><div>I would like to have some kind of expressions to avoid the extra IF:<br></div><div><br></div><div><br></div><div>LOG.debug("The received object has invalid state: {1.currentState}", receivedObject)<br>



</div><div><br></div><div><br></div><div>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 :<br></div>



<div><br></div><div><span style="font-size:13px;font-family:arial,sans-serif">"...I would love to merge the formatter from </span><a href="http://code.google.com/p/anodyzed" style="font-size:13px;font-family:arial,sans-serif" target="_blank">http://code.google.com/p/anodyzed</a><span style="font-size:13px;font-family:arial,sans-serif"> directly into a pluggable SLF4j..."</span><br>



</div><div><br clear="all"><div>Is this implemented or is it going to be implemented? Are there any alternatives to what I'm doing?<br></div><div><br></div><div>Thanks in advance for your responses</div><span class="HOEnZb"><font color="#888888"><div>

<br></div>

-- <br><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><div><b>Darío García</b></div><div>Agile Software Development</div><div><a href="tel:%2B54%20%28911%29%206336-3707" value="+5491163363707" target="_blank">+54 (911) 6336-3707</a></div>

<div><strong><span style="font-size:8pt"><span style="font-size:small"><font><span style="font-weight:normal">Office: <a href="tel:%2B54%20-%20011%20-%204311-8404" value="+541143118404" target="_blank">+54 - 011 - 4311-8404</a></span></font></span></span></strong></div>



<div><a href="mailto:dario.garcia@10pines.com" style="color:rgb(42,93,176)" target="_blank"><font color="#33CC00"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34)">dario.garcia@10pines.com</span></font></a></div>



</span>
</font></span></div></div>
<br>_______________________________________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br></blockquote></div><br></div>