Commit d396eb39 authored by Ximin Luo's avatar Ximin Luo

Show the timestamp when logging so I know which steps take longer

parent f19a9d50
......@@ -33,7 +33,7 @@ logger.setLevel(logging.WARNING)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
logger.addHandler(ch)
formatter = logging.Formatter('%(levelname)8s %(message)s')
formatter = logging.Formatter('%(created)f %(levelname)8s %(message)s')
ch.setFormatter(formatter)
OS_NAMES = {
......
......@@ -153,6 +153,8 @@ def compare_commented_files(file1, file2, comment=None, source=None):
def specialize(file):
for cls in FILE_CLASSES:
# Uncomment the below to see which comparisons take ages to run "identify"
#logger.debug("testing for %s", cls)
if isinstance(file, cls):
logger.debug("%s is already specialized", file.name)
return file
......
......@@ -173,6 +173,7 @@ def run_diffoscope(parsed_args):
if parsed_args.debug:
logger.setLevel(logging.DEBUG)
set_locale()
logger.debug('Starting comparison')
difference = diffoscope.comparators.compare_root_paths(
parsed_args.path1, parsed_args.path2)
if difference:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment