Add in better logging.

This commit is contained in:
Mike Auty
2017-12-13 20:48:52 +00:00
parent 942de5f166
commit e23bb65162
2 changed files with 4 additions and 0 deletions
@@ -8,6 +8,7 @@ once a layer successfully stacks on top of the existing layers, it is removed fr
"""
import logging
import traceback
import typing
import volatility
@@ -85,7 +86,9 @@ class LayerStacker(interfaces.automagic.AutomagicInterface):
break
except Exception as excp:
# Stacking exceptions are likely only of interest to developers, so the lowest level of logging
fulltrace = traceback.TracebackException.from_exception(excp).format(chain = True)
vollog.log(constants.LOGLEVEL_VVV, "Exception during stacking: {}".format(str(excp)))
vollog.log(constants.LOGLEVEL_VVVV, "\n".join(fulltrace))
else:
stacked = False
if new_layer and stacker_cls:
@@ -18,6 +18,7 @@ DISABLE_MULTITHREADED_SCANNING = False
LOGLEVEL_V = 9
LOGLEVEL_VV = 8
LOGLEVEL_VVV = 7
LOGLEVEL_VVVV = 6
if sys.platform == 'windows':
CACHE_PATH = os.path.join(os.environ.get("APPDATA", os.path.expanduser("~")), "volatility3")