def check_all_logs(directory, time_thresh):
log_files = glob.glob(directory + '<STR_LIT>')<EOL>print('<STR_LIT>' + str(len(log_files)) + '<STR_LIT>')<EOL>total_phase_errs = []<EOL>for i, log_file in enumerate(log_files):<EOL><INDENT>startdate = dt.datetime.strptime(log_file.split('<STR_LIT:/>')[-<NUM_LIT:4>][<NUM_LIT:0>:<NUM_LIT:7>],<EOL>'<STR_LIT>').date()<EOL>total_phase_errs += rt_time_log(log_file, startdate)<EOL>sys.stdout.write("<STR_LIT:\r>" + str(float(i) / len(log_files) * <NUM_LIT:100>) +<EOL>"<STR_LIT>")<EOL>sys.stdout.flush()<EOL><DEDENT>time_errs = flag_time_err(total_phase_errs, time_thresh)<EOL>time_errs.sort()<EOL>return time_errs, total_phase_errs<EOL>
Check all the log-files in a directory tree for timing errors.

:type directory: str
:param directory: Directory to search within
:type time_thresh: float
:param time_thresh: Time threshold in seconds

:returns: List of :class:`datetime.datetime` for which error timing is
    above threshold, e.g. times when data are questionable.
:rtype: list