[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Registering TRACE and NOTICE level names
commit 228a431b06b2a89182335216b4d9cfce166c6ce9
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Wed Jan 4 17:34:50 2012 -0800
Registering TRACE and NOTICE level names
Registering the custom TRACE and NOTICE runlevels with the logging module so
their names will appear when we log a runlevel.
---
stem/util/log.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/stem/util/log.py b/stem/util/log.py
index fc4244f..5c5815e 100644
--- a/stem/util/log.py
+++ b/stem/util/log.py
@@ -35,6 +35,9 @@ LOG_VALUES = {
Runlevel.ERROR: logging.ERROR,
}
+logging.addLevelName(LOG_VALUES[TRACE], "TRACE")
+logging.addLevelName(LOG_VALUES[NOTICE], "NOTICE")
+
LOGGER = logging.getLogger("stem")
LOGGER.setLevel(LOG_VALUES[TRACE])
@@ -131,4 +134,3 @@ def escape(message):
return message
-
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits