summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2010-07-27 15:34:25 +0200
committerSebastien Martini <seb@dbzteam.org>2010-07-27 15:34:25 +0200
commit2b156d82abad209bbd7470366a9c9ca1564b7659 (patch)
treef7868ee352e5bc633b757530042512b79dd8d3a8
parent3fb456af85bdf73ae38b00ebc16a16777a858321 (diff)
downloadpyinotify-2b156d82abad209bbd7470366a9c9ca1564b7659.tar.gz
Modified logging formatter to output timestamps (idea submitted by
hv@tbz-pariv.de).
-rwxr-xr-xpython2/pyinotify.py2
-rwxr-xr-xpython3/pyinotify.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py
index 430c467..cda126d 100755
--- a/python2/pyinotify.py
+++ b/python2/pyinotify.py
@@ -179,7 +179,7 @@ def logger_init():
log = logging.getLogger("pyinotify")
console_handler = logging.StreamHandler()
console_handler.setFormatter(
- logging.Formatter("[Pyinotify %(levelname)s] %(message)s"))
+ logging.Formatter("[%(asctime)s %(name)s %(levelname)s] %(message)s"))
log.addHandler(console_handler)
log.setLevel(20)
return log
diff --git a/python3/pyinotify.py b/python3/pyinotify.py
index 6edd780..d39638a 100755
--- a/python3/pyinotify.py
+++ b/python3/pyinotify.py
@@ -134,7 +134,7 @@ def logger_init():
log = logging.getLogger("pyinotify")
console_handler = logging.StreamHandler()
console_handler.setFormatter(
- logging.Formatter("[Pyinotify %(levelname)s] %(message)s"))
+ logging.Formatter("[%(asctime)s %(name)s %(levelname)s] %(message)s"))
log.addHandler(console_handler)
log.setLevel(20)
return log