diff options
author | Sebastien Martini <seb@dbzteam.org> | 2010-07-27 15:34:25 +0200 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2010-07-27 15:34:25 +0200 |
commit | 2b156d82abad209bbd7470366a9c9ca1564b7659 (patch) | |
tree | f7868ee352e5bc633b757530042512b79dd8d3a8 | |
parent | 3fb456af85bdf73ae38b00ebc16a16777a858321 (diff) | |
download | pyinotify-2b156d82abad209bbd7470366a9c9ca1564b7659.tar.gz |
Modified logging formatter to output timestamps (idea submitted by
hv@tbz-pariv.de).
-rwxr-xr-x | python2/pyinotify.py | 2 | ||||
-rwxr-xr-x | python3/pyinotify.py | 2 |
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 |