Adds a print_debug message handler -- mostly useful during development to easily inspect objects.
git-svn-id: file:///home/svn/framework3/trunk@8353 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
2ffe4abb5d
commit
3fe8d0375b
|
@ -118,6 +118,13 @@ class Plugin
|
|||
output.print_good(msg) if (output)
|
||||
end
|
||||
|
||||
#
|
||||
# Prints a 'debug' message.
|
||||
#
|
||||
def print_debug(msg='')
|
||||
output.print_debug(msg) if (output)
|
||||
end
|
||||
|
||||
#
|
||||
# Prints a status line.
|
||||
#
|
||||
|
@ -176,4 +183,4 @@ protected
|
|||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -86,6 +86,10 @@ class BidirectionalPipe < Rex::Ui::Text::Input
|
|||
print_line('[+] ' + msg)
|
||||
end
|
||||
|
||||
def print_debug(msg='')
|
||||
print_line('[!] ' + msg)
|
||||
end
|
||||
|
||||
def flush
|
||||
end
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ class Output
|
|||
def print_good(msg='')
|
||||
end
|
||||
|
||||
def print_debug(msg='')
|
||||
end
|
||||
|
||||
#
|
||||
# Prints a status line.
|
||||
#
|
||||
|
|
|
@ -55,6 +55,16 @@ module Subscriber
|
|||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Wraps user_output.print_debug
|
||||
#
|
||||
def print_debug(msg='')
|
||||
if (user_output)
|
||||
print_blank_line if user_output.prompting?
|
||||
user_output.print_debug(msg)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Wraps user_output.print
|
||||
#
|
||||
|
@ -136,4 +146,4 @@ module Subscriber
|
|||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,6 +52,10 @@ class Output < Rex::Ui::Output
|
|||
print_line("%bld%grn[+]%clr #{msg}")
|
||||
end
|
||||
|
||||
def print_debug(msg = '')
|
||||
print_line("%bld%cya[!]%clr #{msg}")
|
||||
end
|
||||
|
||||
def print_status(msg = '')
|
||||
print_line("%bld%blu[*]%clr #{msg}")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue