No need to do isDebugEnabled ideally for formatted logs.
On Thu, Jun 9, 2016 at 3:01 PM, Jayanga Kaushalya <[email protected]> wrote:
> Hi,
>
> Do we need to check whether the isDebugEnabled() for formatted debug logs
> without any string concatenations? For example below code:
>
> if (log.isDebugEnabled) {
> log.debug("Test log with var: {} and var: {}", var1, var2);
> }
>
> If we have to check it is, what is the best way to check it? Assign it to
> a final variable in the class header or check it every time where their is
> a debug log like above code?
>
> Thanks!
>
> *Jayanga Kaushalya*
> Software Engineer
> Mobile: +94777860160
> WSO2 Inc. | http://wso2.com
> lean.enterprise.middleware
>
--
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* <http://www.apache.org/>*
*email: **[email protected]* <[email protected]>
* cell: +94 77 3320919blog: **http://blog.afkham.org*
<http://blog.afkham.org>
*twitter: **http://twitter.com/afkham_azeez*
<http://twitter.com/afkham_azeez>
*linked-in: **http://lk.linkedin.com/in/afkhamazeez
<http://lk.linkedin.com/in/afkhamazeez>*
*Lean . Enterprise . Middleware*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev