HBASE-11662 shell should properly handle long form --debug. Signed-off-by: Andrew Purtell <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/74c71692 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/74c71692 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/74c71692 Branch: refs/heads/0.98 Commit: 74c7169252e67ff2f578a0d61b8cb11276ddfcbe Parents: f10effb Author: Sean Busbey <[email protected]> Authored: Mon Aug 4 14:47:54 2014 -0500 Committer: Andrew Purtell <[email protected]> Committed: Mon Aug 4 21:32:01 2014 -0700 ---------------------------------------------------------------------- bin/hirb.rb | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/74c71692/bin/hirb.rb ---------------------------------------------------------------------- diff --git a/bin/hirb.rb b/bin/hirb.rb index dc1fecc..0503c29 100644 --- a/bin/hirb.rb +++ b/bin/hirb.rb @@ -78,6 +78,7 @@ for arg in ARGV log_level = org.apache.log4j.Level::DEBUG $fullBackTrace = true @shell_debug = true + found.push(arg) puts "Setting DEBUG log level..." else # Presume it a script. Save it off for running later below @@ -91,6 +92,10 @@ end # Delete all processed args found.each { |arg| ARGV.delete(arg) } +# Make sure debug flag gets back to IRB +if @shell_debug + ARGV.unshift('-d') +end # Set logging level to avoid verboseness org.apache.log4j.Logger.getLogger("org.apache.zookeeper").setLevel(log_level)
