+ # for f in files:
+
+ # file_mod_time = os.stat(f).st_mtime
+
+ # Time in seconds since epoch for time, in which logfile can be unmodified.
+ # should_time = time.time() - (30 * 60)
+
+ # Time in minutes since last modification of file
+ # last_time = (time.time() - file_mod_time)
+ # logger.debug(last_time)
+
+ # if (file_mod_time - should_time) < args.time:
+ # print "CRITICAL: {} last modified {:.2f} minutes. Threshold set to 30 minutes".format(last_time, file, last_time)
+ # else:
+
+ # if (datetime.timedelta(datetime.datetime.now() - datetime.fromtimestamp(os.path.getmtime(f))).days > 7):
+ # files.remove(f)