You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2014/05/26 14:07:02 UTC

[jira] [Comment Edited] (HIVE-6923) Use slf4j For Logging Everywhere

    [ https://issues.apache.org/jira/browse/HIVE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008783#comment-14008783 ] 

Thejas M Nair edited comment on HIVE-6923 at 5/26/14 12:05 PM:
---------------------------------------------------------------

bq. importantly most of other components in hadoop ecosystem use commons-logging and its important that we are aligned with hadoop

Hadoop community seems to have formed a consensus around switching to slf4j - http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201404.mbox/%3CCABCYYb9B4d_7maFtgp5zqkOyNW-iMi71DCkkww_e_6VMkXWt5g@mail.gmail.com%3E

The reasons cited there to use slf4j over commons-logging seems convincing enough -
{code}
The best initial thing about SL4FJ is how it only expands its arguments
string values if needed

      LOG.debug("Initialized, principal [{}] from keytab [{}]", principal,
keytab);

not logging at debug? No need to test first. That alone saves code and
improves readability.
{code}

But it looks like hadoop is going to be in a mixed slf4j+commons-logging mode for a bit.




was (Author: thejas):
bq. importantly most of other components in hadoop ecosystem use commons-logging and its important that we are aligned with hadoop

Hadoop community seems to have formed a consensus around switching to slf4j - http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201404.mbox/%3CCABCYYb9B4d_7maFtgp5zqkOyNW-iMi71DCkkww_e_6VMkXWt5g@mail.gmail.com%3E

The reasons cited there to use slf4j over commons-logging seems convincing enough -
{code}
The best initial thing about SL4FJ is how it only expands its arguments
string values if needed

      LOG.debug("Initialized, principal [{}] from keytab [{}]", principal,
keytab);

not logging at debug? No need to test first. That alone saves code and
improves readability.

{code}

> Use slf4j For Logging Everywhere
> --------------------------------
>
>                 Key: HIVE-6923
>                 URL: https://issues.apache.org/jira/browse/HIVE-6923
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>            Reporter: Nick White
>            Assignee: Nick White
>             Fix For: 0.14.0
>
>         Attachments: HIVE-6923.patch
>
>
> Hive uses a mixture of slf4j (backed by log4j) and commons-logging. I've attached a patch to tidy this up, by just using slf4j for all loggers. This means that applications using the JDBC driver can make Hive log through their own slf4j implementation consistently.



--
This message was sent by Atlassian JIRA
(v6.2#6252)