* [gentoo-commits] gentoo-x86 commit in dev-python/rst2pdf/files: rst2pdf-0.93-fix-logging.patch
@ 2013-10-29 3:41 Rafael Martins (rafaelmartins)
0 siblings, 0 replies; only message in thread
From: Rafael Martins (rafaelmartins) @ 2013-10-29 3:41 UTC (permalink / raw
To: gentoo-commits
rafaelmartins 13/10/29 03:41:57
Added: rst2pdf-0.93-fix-logging.patch
Log:
Fixed logging issue. Upstream bug 509.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key )
Revision Changes Path
1.1 dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch?rev=1.1&content-type=text/plain
Index: rst2pdf-0.93-fix-logging.patch
===================================================================
--- 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-29 3:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 3:41 [gentoo-commits] gentoo-x86 commit in dev-python/rst2pdf/files: rst2pdf-0.93-fix-logging.patch Rafael Martins (rafaelmartins)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox