projects
/
cascardo
/
ipsilon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1ec8e62
)
Add Log class that can be inherited from safely
author
Simo Sorce
<simo@redhat.com>
Sat, 28 Jun 2014 00:17:00 +0000
(20:17 -0400)
committer
Patrick Uiterwijk
<puiterwijk@redhat.com>
Wed, 27 Aug 2014 22:14:52 +0000
(18:14 -0400)
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
ipsilon/util/log.py
[new file with mode: 0755]
patch
|
blob
diff --git a/ipsilon/util/log.py
b/ipsilon/util/log.py
new file mode 100755
(executable)
index 0000000..
3000bb5
--- /dev/null
+++ b/
ipsilon/util/log.py
@@ -0,0
+1,20
@@
+#!/usr/bin/python
+#
+# Copyright (C) 2014 Ipsilon Project Contributors
+#
+# See the file named COPYING for the project license
+
+import cherrypy
+
+
+class Log(object):
+
+ def debug(self, fact):
+ if cherrypy.config.get('debug', False):
+ cherrypy.log(fact)
+
+ # for compatibility with existing code
+ _debug = debug
+
+ def log(self, fact):
+ cherrypy.log(fact)