mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-22 06:05:33 -06:00
fix agent debug/logging
This commit is contained in:
parent
0c6949d27b
commit
8407d0f32c
2 changed files with 7 additions and 7 deletions
|
|
@ -111,7 +111,7 @@ def agent(options=None):
|
|||
|
||||
check_config(conf)
|
||||
|
||||
agent = Agent(conf, options.log, options.logfile)
|
||||
agent = Agent(conf, options.log, options.logfile, options.debug)
|
||||
agent.run()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,11 +68,11 @@ class BUIAgent(BUIbackend):
|
|||
'version': g_version, 'password': g_password
|
||||
}
|
||||
|
||||
def __init__(self, conf=None, debug=False, logfile=None):
|
||||
def __init__(self, conf=None, level=0, logfile=None, debug=False):
|
||||
self.conf = conf
|
||||
self.dbg = debug
|
||||
self.debug = debug
|
||||
self.padding = 1
|
||||
if debug > logging.NOTSET:
|
||||
if level > logging.NOTSET:
|
||||
logging.addLevelName(DISCLOSURE, 'DISCLOSURE')
|
||||
levels = [
|
||||
logging.CRITICAL,
|
||||
|
|
@ -82,9 +82,9 @@ class BUIAgent(BUIbackend):
|
|||
logging.DEBUG,
|
||||
DISCLOSURE
|
||||
]
|
||||
if debug >= len(levels):
|
||||
debug = len(levels) - 1
|
||||
lvl = levels[debug]
|
||||
if level >= len(levels):
|
||||
level = len(levels) - 1
|
||||
lvl = levels[level]
|
||||
self.app.logger = logging.getLogger('burp-ui')
|
||||
self.set_logger(self.app.logger)
|
||||
self.logger.setLevel(lvl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue