Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5B28DBA2 for ; Fri, 26 Oct 2012 23:17:12 +0000 (UTC) Received: (qmail 92725 invoked by uid 500); 26 Oct 2012 23:17:12 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 92693 invoked by uid 500); 26 Oct 2012 23:17:12 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 92684 invoked by uid 99); 26 Oct 2012 23:17:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 23:17:12 +0000 Date: Fri, 26 Oct 2012 23:17:12 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: <151789914.33987.1351293432489.JavaMail.jiratomcat@arcas> In-Reply-To: <676709255.45127.1306410947465.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-3925) Make Shell's -d and debug cmd behave the same MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-3925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485267#comment-13485267 ] stack commented on HBASE-3925: ------------------------------ [~xieliang007] Mind attaching console output that demonstrates this patch does what it claims? Patch looks good. > 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, HBASE-3925-v2.txt > > > 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