Implemented new logging functions, refactored to suit.

This commit is contained in:
th3r00t
2020-08-25 13:59:06 -04:00
parent 59719c19f2
commit f2729e05db
9 changed files with 59 additions and 69 deletions

View File

@@ -11,13 +11,13 @@ from .lib.storage import Storage
sys.path.append(os.path.abspath("."))
def MakeCollections(root):
def MakeCollections(root, **kwargs):
_t1 = time.time()
config = Config(root) # Get configuration settings
try: config = kwargs['config']
except KeyError as e: config = Config(root)
# InitFiles(config.file_array) # Initialize file system
_storage = Storage(config)
_storage.make_collections()
_t2 = time.time()
scan_time = round(_t2 - _t1)
print("Collections Made.")
print("Time %s seconds" % scan_time)
config.logger.info("Collections made in {}".format(scan_time))