:D On Sat, Jan 10, 2015 at 3:37 PM, Afkham Azeez <[email protected]> wrote:
> Please, don't overanalyze this simple thing. Even if it is a single string > do the debug check. Even if it is a single line of code inside a code > block, use braces. Always follow best practices. I have seen enough & more > bad code during reviews, we don't have to overanalyze this and argue about > what's best to do. There are many places where people haven't done the > debug check even when there is String concatenation. > > If you are bored, get into an argument about recently concluded election > on FB. Don't try to overanalyze best practices. :D > > On Sat, Jan 10, 2015 at 2:39 PM, Rajith Vitharana <[email protected]> > wrote: > >> Hi, >> >> AFAIK this performance hit is there only when there are string operations >> inside the log. isn't that the case? if it's the case, it would be ok not >> to do the isdebugenable check for those logs which doesn't have string >> operations. isn't that correct? >> >> Thanks, >> >> On Sat, Jan 10, 2015 at 2:30 PM, Danushka Fernando <[email protected]> >> wrote: >> >>> Hi Bhathiya >>> AFAIK There is a performance hit on this. We dont enable debug level >>> logs in production level systems. But in log4j it skip debug level logs >>> getting printed just before append it to logs. So when check is there it >>> happens at start. >>> >>> Thanks & Regards >>> Danushka Fernando >>> Software Engineer >>> WSO2 inc. http://wso2.com/ >>> Mobile : +94716332729 >>> >>> On Sat, Jan 10, 2015 at 11:21 AM, Bhathiya Jayasekara <[email protected] >>> > wrote: >>> >>>> Hi Azeez, >>>> >>>> On Fri, Jan 9, 2015 at 5:26 PM, Afkham Azeez <[email protected]> wrote: >>>> >>>>> Put the debug check condition always. Follow it religiously. >>>>> >>>> >>>> Why do we need to do this for single lines of debug logs? Any >>>> particular reason or just as a convention? >>>> >>>> Thanks, >>>> Bhathiya >>>> >>>> >>>>> >>>>> On Fri, Jan 9, 2015 at 5:09 PM, Gayan Gunawardana <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> Currently I am going through user core exception handling and >>>>>> identifying changes required to do. >>>>>> >>>>>> In user core [1] there are couple of places debug logs exists without >>>>>> isDebugEnabled check. >>>>>> >>>>>> Ex:getSearchBaseDirectoryContext(), setUserClaims() >>>>>> >>>>>> Is there any rule for places where we can ignore isDebugEnabled check >>>>>> or should we do isDebugEnabled check always? >>>>>> >>>>>> [1] >>>>>> https://github.com/wso2-dev/carbon4-kernel/blob/master/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/ldap/ReadWriteLDAPUserStoreManager.java >>>>>> -- >>>>>> Gayan Gunawardana >>>>>> Software Engineer; WSO2 Inc.; http://wso2.com/ >>>>>> Email: [email protected] >>>>>> Mobile: +94 (71) 8020933 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *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 3320919 <%2B94%2077%203320919>blog: * >>>>> *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 >>>>> >>>>> >>>> >>>> >>>> -- >>>> *Bhathiya Jayasekara* >>>> *Software Engineer,* >>>> *WSO2 inc., http://wso2.com <http://wso2.com>* >>>> >>>> *Phone: +94715478185 <%2B94715478185>* >>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj >>>> <http://www.linkedin.com/in/bhathiyaj>* >>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>* >>>> *Blog: http://movingaheadblog.blogspot.com >>>> <http://movingaheadblog.blogspot.com/>* >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Rajith Vitharana >> >> Software Engineer, >> WSO2 Inc. : wso2.com >> Mobile : +94715883223 >> Blog : http://lankavitharana.blogspot.com/ >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *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 3320919 <%2B94%2077%203320919>blog: * > *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* > -- Rajith Vitharana Software Engineer, WSO2 Inc. : wso2.com Mobile : +94715883223 Blog : http://lankavitharana.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
