You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "philo vivero (JIRA)" <ji...@apache.org> on 2013/03/16 02:23:11 UTC

[jira] [Updated] (HBASE-8126) log4j hbase.root.logger is always overwritten by ENV, even if not defined

     [ https://issues.apache.org/jira/browse/HBASE-8126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

philo vivero updated HBASE-8126:
--------------------------------

    Description: 
Go to log4j.properties. Note this sequence of definitions:

{noformat}
hbase.root.logger=INFO,console
log4j.rootLogger=${hbase.root.logger}
{noformat}

One would think they could change hbase.root.logger to something else. Say "INFO,console,SYSLOG" and then define syslogging, but they'd be wrong. The syslog won't take effect. The second line will always go back to "INFO,console" (or something, we're not able to determine what it's reverting to exactly).

What's happening is that the HBASE_ROOT_LOGGER environment variable from hbase-env.sh ALWAYS overwrites that variable before it's used.

However, in our environment, HBASE_ROOT_LOGGER wasn't being defined. It was commented out. Still, something sets that environment variable to a default and uses it, always clobbering the log4j.properties hbase.root.logger.

Suggestion: either don't define hbase.root.logger in log4j.properties at all (instead place a comment stating that HBASE_ROOT_LOGGER environment variable in hbase-env.sh is the proper place to change it), or have modifications in log4j take precedence (and comment such in hbase-env.sh).

  was:
Go to log4j.properties. Note this sequence of definitions:

hbase.root.logger=INFO,console
log4j.rootLogger=${hbase.root.logger}

One would think they could change hbase.root.logger to something else. Say "INFO,console,SYSLOG" and then define syslogging, but they'd be wrong. The syslog won't take effect. The second line will always go back to "INFO,console" (or something, we're not able to determine what it's reverting to exactly).

What's happening is that the HBASE_ROOT_LOGGER environment variable from hbase-env.sh ALWAYS overwrites that variable before it's used.

However, in our environment, HBASE_ROOT_LOGGER wasn't being defined. It was commented out. Still, something sets that environment variable to a default and uses it, always clobbering the log4j.properties hbase.root.logger.

Suggestion: either don't define hbase.root.logger in log4j.properties at all (instead place a comment stating that HBASE_ROOT_LOGGER environment variable in hbase-env.sh is the proper place to change it), or have modifications in log4j take precedence (and comment such in hbase-env.sh).

    
> log4j hbase.root.logger is always overwritten by ENV, even if not defined
> -------------------------------------------------------------------------
>
>                 Key: HBASE-8126
>                 URL: https://issues.apache.org/jira/browse/HBASE-8126
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.92.1
>         Environment: Ubuntu Linux 10.04 LTS
>            Reporter: philo vivero
>
> Go to log4j.properties. Note this sequence of definitions:
> {noformat}
> hbase.root.logger=INFO,console
> log4j.rootLogger=${hbase.root.logger}
> {noformat}
> One would think they could change hbase.root.logger to something else. Say "INFO,console,SYSLOG" and then define syslogging, but they'd be wrong. The syslog won't take effect. The second line will always go back to "INFO,console" (or something, we're not able to determine what it's reverting to exactly).
> What's happening is that the HBASE_ROOT_LOGGER environment variable from hbase-env.sh ALWAYS overwrites that variable before it's used.
> However, in our environment, HBASE_ROOT_LOGGER wasn't being defined. It was commented out. Still, something sets that environment variable to a default and uses it, always clobbering the log4j.properties hbase.root.logger.
> Suggestion: either don't define hbase.root.logger in log4j.properties at all (instead place a comment stating that HBASE_ROOT_LOGGER environment variable in hbase-env.sh is the proper place to change it), or have modifications in log4j take precedence (and comment such in hbase-env.sh).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira