summaryrefslogtreecommitdiff
path: root/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch')
-rw-r--r--dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch b/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch
new file mode 100644
index 00000000000..52acf04171d
--- /dev/null
+++ b/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch
@@ -0,0 +1,26 @@
+--- rst2pdf/log.py
++++ rst2pdf/log.py
+@@ -4,11 +4,12 @@
+ import logging
+ import sys
+
+-logging.basicConfig(
+- format='[%(levelname)s] %(filename)s:%(lineno)d %(message)s',
+- level=logging.WARNING)
+-
+ log = logging.getLogger('rst2pdf')
++_fmt = logging.Formatter('[%(levelname)s] %(filename)s:%(lineno)d %(message)s')
++_hdlr = logging.StreamHandler()
++_hdlr.setFormatter(_fmt)
++log.addHandler(_hdlr)
++log.setLevel(logging.WARNING)
+
+ def nodeid(node):
+ """Given a node, tries to return a way to see where it was in the
+@@ -23,4 +24,4 @@
+ if node.source: fname=str(node.source)
+ except:
+ pass
+- return 'near line %s in file %s'%(line,fname)
+\ No newline at end of file
++ return 'near line %s in file %s'%(line,fname)