Fix script verbosity (#382)

* fix script verbosity

* show manticore logger

* remove unused MAIN logger
This commit is contained in:
JP Smith
2017-07-11 12:06:33 -04:00
committed by GitHub
parent b47f0cff14
commit c887fb160e
2 changed files with 4 additions and 11 deletions
-2
View File
@@ -15,8 +15,6 @@ except ImportError:
pass
sys.setrecursionlimit(10000)
logger = logging.getLogger('MAIN')
def parse_arguments():
###########################################################################
# parse arguments
+4 -9
View File
@@ -243,16 +243,11 @@ class Manticore(object):
ctxfilter = ContextFilter()
logging.basicConfig(format='%(asctime)s: [%(process)d]%(stateid)s %(name)s:%(levelname)s: %(message)s', stream=sys.stdout)
logging.basicConfig(format='%(asctime)s: [%(process)d]%(stateid)s %(name)s:%(levelname)s: %(message)s', stream=sys.stdout, level=logging.ERROR)
for loggername in ['MANTICORE', 'VISITOR', 'EXECUTOR', 'CPU', 'REGISTERS', 'SMT', 'MEMORY', 'MAIN', 'PLATFORM']:
for loggername in ['MANTICORE', 'VISITOR', 'EXECUTOR', 'CPU', 'REGISTERS', 'SMT', 'MEMORY', 'PLATFORM']:
logging.getLogger(loggername).addFilter(ctxfilter)
logging.getLogger(loggername).setState = types.MethodType(loggerSetState, logging.getLogger(loggername))
logging.getLogger('SMT').setLevel(logging.INFO)
logging.getLogger('MEMORY').setLevel(logging.INFO)
logging.getLogger('LIBC').setLevel(logging.INFO)
logging.getLogger('MANTICORE').setLevel(logging.INFO)
# XXX(yan): args is a temporary hack to include while we continue moving
# non-Linux platforms to new-style arg handling.
@@ -315,9 +310,9 @@ class Manticore(object):
@verbosity.setter
def verbosity(self, setting):
zero = map(lambda x: (x, logging.ERROR),
['MANTICORE', 'VISITOR', 'EXECUTOR', 'CPU', 'REGISTERS', 'SMT', 'MEMORY', 'MAIN', 'PLATFORM'])
['MANTICORE', 'VISITOR', 'EXECUTOR', 'CPU', 'REGISTERS', 'SMT', 'MEMORY', 'PLATFORM'])
levels = [zero,
[('MAIN', logging.INFO), ('EXECUTOR', logging.INFO)],
[('MANTICORE', logging.INFO), ('EXECUTOR', logging.INFO)],
[('PLATFORM', logging.DEBUG)],
[('MEMORY', logging.DEBUG), ('CPU', logging.DEBUG)],
[('REGISTERS', logging.DEBUG)],