hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-3925) Make Shell's -d and debug cmd behave the same
Date Tue, 23 Oct 2012 19:51:13 GMT

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

Ted Yu commented on HBASE-3925:
-------------------------------

Change looks good.
Please generate the patch from root directory of workspace.
                
> Make Shell's -d and debug cmd behave the same
> ---------------------------------------------
>
>                 Key: HBASE-3925
>                 URL: https://issues.apache.org/jira/browse/HBASE-3925
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>    Affects Versions: 0.90.3, 0.90.7, 0.92.2, 0.94.3, 0.96.0, 0.98.0
>            Reporter: Lars George
>            Assignee: liang xie
>            Priority: Trivial
>              Labels: patch
>         Attachments: HBASE-3925.patch
>
>
> The -d option switches log4j to DEBUG and leaves the backtrace level at the default.
When using the supplied debug command we only switch the backtrace, but I would think this
also should set the log4j levels:
> {noformat}
> # Debugging method
> def debug
>   if @shell.debug
>     @shell.debug = false
>     conf.back_trace_limit = 0
>   else
>     @shell.debug = true
>     conf.back_trace_limit = 100
>   end
>   debug?
> end
> {noformat}
> could be something like 
> {noformat}
> # Debugging method
> def debug
>   if @shell.debug
>     @shell.debug = false
>     conf.back_trace_limit = 0
>     log_level = org.apache.log4j.Level::ERROR
>   else
>     @shell.debug = true
>     conf.back_trace_limit = 100
>     log_level = org.apache.log4j.Level::DEBUG
>   end
>   org.apache.log4j.Logger.getLogger("org.apache.zookeeper").setLevel(log_level)
>   org.apache.log4j.Logger.getLogger("org.apache.hadoop.hbase").setLevel(log_level)
>   debug?
> end
> {noformat}

--
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

Mime
View raw message