From 59c97c5d316f815c82a4cf1228acf084f441ea90 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Fri, 1 Aug 2014 13:38:51 +0800 Subject: [PATCH] Displaying the time when js shift watcher finds changes --- mdk/commands/js.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.11.0