From: Frederic Massart Date: Fri, 1 Aug 2014 05:38:51 +0000 (+0800) Subject: Displaying the time when js shift watcher finds changes X-Git-Tag: v1.4~32 X-Git-Url: https://git.cameron1729.xyz/?a=commitdiff_plain;h=59c97c5d316f815c82a4cf1228acf084f441ea90;p=mdk.git Displaying the time when js shift watcher finds changes --- diff --git a/mdk/commands/js.py b/mdk/commands/js.py index 6401218..67b891a 100644 --- a/mdk/commands/js.py +++ b/mdk/commands/js.py @@ -25,6 +25,7 @@ http://github.com/FMCorz/mdk import logging import os import time +import datetime import watchdog.events import watchdog.observers from ..command import Command @@ -178,6 +179,6 @@ class JsShiftWatcher(watchdog.events.FileSystemEventHandler): elif not os.path.splitext(event.src_path)[1] in self._ext: return - logging.info('[%s] Changes detected!' % (self._M.get('identifier'))) + logging.info('[%s] (%s) Changes detected!' % (self._M.get('identifier'), datetime.datetime.now().strftime('%H:%M:%S'))) # How about handling exceptions here? self._processor.shift(**self._args)