Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-22 Thread Andrew Wang
#7, if I understand Tucu's point correctly, was that removing isDebugEnabled guards also requires updating the logging to use templates rather than string construction. We don't need guards with the new-style templated logging. +1 besides that though Steve, thanks for writing this up. It seems

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-22 Thread Alejandro Abdelnur
correct. thx Alejandro (phone typing) On Apr 22, 2014, at 15:02, Andrew Wang andrew.w...@cloudera.com wrote: #7, if I understand Tucu's point correctly, was that removing isDebugEnabled guards also requires updating the logging to use templates rather than string construction. We don't

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-22 Thread Jay Vyas
Couple more questions: - what is source vs. modules in steve's above outline? - Should individual JIRAs be submitted to start doing this for segments of the code, and if so at what granularity?

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-18 Thread Steve Loughran
OK, should what policy should we recommend, using RFC2119 should/may/must Source: 1. switch to SLF4J in imports and use -except in situations where access to any underlying log4j appender is needed. In that case: retain commons-logging 2. Methods that take a commons-logging argument

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-16 Thread Eric Baldeschwieler
+1 * many. I'd love to see us clean this up. Getting to agreement on where we are going would be a huge step forward. -- Eric14 a.k.a. Eric Baldeschwieler On Mon, Apr 14, 2014 at 3:33 PM, Steve Loughran ste...@hortonworks.comwrote: On 11 April 2014 18:37, Alejandro Abdelnur

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-14 Thread Chris Nauroth
+1 for the proposal. Notice also in Steve's examples that there is a lower risk of a format conversion bug compared to printf style with String.format. Chris Nauroth Hortonworks http://hortonworks.com/ On Fri, Apr 11, 2014 at 10:37 AM, Alejandro Abdelnur t...@cloudera.comwrote: if you dont

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-14 Thread Steve Loughran
On 11 April 2014 18:37, Alejandro Abdelnur t...@cloudera.com wrote: if you dont convert mgs to templates the dont remove the guards, else you create str mgs obj even when not logging. that is -we should have static constants? I like to do that in strings anyway, because tests can stay in sync

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-11 Thread Karthik Kambatla
On Fri, Apr 11, 2014 at 1:37 AM, Steve Loughran ste...@hortonworks.comwrote: On 10 April 2014 16:38, Karthik Kambatla ka...@cloudera.com wrote: +1 to use slf4j. I would actually vote for (1) new modules must-use, (2) new classes in existing modules are strongly recommended to use, (3)

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-11 Thread Abdelrahman Shettia
In addition, we need to consider limiting any printing messages to the stdout in some cases. This can impact other running some apache products in silent mode such as hive in 'hive -S' option. Thanks -Rahman On Fri, Apr 11, 2014 at 10:06 AM, Karthik Kambatla ka...@cloudera.comwrote: On Fri,

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-11 Thread Alejandro Abdelnur
if you dont convert mgs to templates the dont remove the guards, else you create str mgs obj even when not logging. thx Alejandro (phone typing) On Apr 11, 2014, at 10:06, Karthik Kambatla ka...@cloudera.com wrote: On Fri, Apr 11, 2014 at 1:37 AM, Steve Loughran

DISCUSS: use SLF4J APIs in new modules?

2014-04-10 Thread Steve Loughran
If we're thinking of future progress, here's a little low-level one: adopt SLF4J as the API for logging 1. its the new defacto standard of logging APIs 2. its a lot better than commons-logging with on demand Inline string expansion of varags arguments. 3. we already ship it, as jetty

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-10 Thread Jay Vyas
Slf4j is definetly a great step forward. Log4j is restrictive for complex and multi tenant apps like hadoop. Also the fact that slf4j doesn't use any magic when binding to its log provider makes it way easier to swap out its implementation then tools of the past. On Apr 10, 2014, at 2:16 AM,

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-10 Thread Andrew Wang
+1 from me, it'd be lovely to get rid of all those isDebugEnabled checks. On Thu, Apr 10, 2014 at 4:13 AM, Jay Vyas jayunit...@gmail.com wrote: Slf4j is definetly a great step forward. Log4j is restrictive for complex and multi tenant apps like hadoop. Also the fact that slf4j doesn't use

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-10 Thread Alejandro Abdelnur
+1 pn slf4j. one thing Jay, the issues with log4j will still be there as log4j will still be under the hood. thx Alejandro (phone typing) On Apr 10, 2014, at 7:35, Andrew Wang andrew.w...@cloudera.com wrote: +1 from me, it'd be lovely to get rid of all those isDebugEnabled checks.

Re: DISCUSS: use SLF4J APIs in new modules?

2014-04-10 Thread Karthik Kambatla
+1 to use slf4j. I would actually vote for (1) new modules must-use, (2) new classes in existing modules are strongly recommended to use, (3) existing classes can switch to. That would take us closer to using slf4j everywhere faster. On Thu, Apr 10, 2014 at 8:17 AM, Alejandro Abdelnur