Commit d396eb39 authored by Ximin Luo's avatar Ximin Luo
Browse files

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

parent f19a9d50
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = {
+2 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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: