Gentoo Archives: gentoo-commits

From: "Rafael Martins (rafaelmartins)" <rafaelmartins@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/rst2pdf/files: rst2pdf-0.93-fix-logging.patch
Date: Tue, 29 Oct 2013 03:42:06
Message-Id: 20131029034157.AFFA320035@flycatcher.gentoo.org
1 rafaelmartins 13/10/29 03:41:57
2
3 Added: rst2pdf-0.93-fix-logging.patch
4 Log:
5 Fixed logging issue. Upstream bug 509.
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key )
8
9 Revision Changes Path
10 1.1 dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch?rev=1.1&view=markup
13 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
14
15 Index: rst2pdf-0.93-fix-logging.patch
16 ===================================================================
17 --- rst2pdf/log.py
18 +++ rst2pdf/log.py
19 @@ -4,11 +4,12 @@
20 import logging
21 import sys
22
23 -logging.basicConfig(
24 - format='[%(levelname)s] %(filename)s:%(lineno)d %(message)s',
25 - level=logging.WARNING)
26 -
27 log = logging.getLogger('rst2pdf')
28 +_fmt = logging.Formatter('[%(levelname)s] %(filename)s:%(lineno)d %(message)s')
29 +_hdlr = logging.StreamHandler()
30 +_hdlr.setFormatter(_fmt)
31 +log.addHandler(_hdlr)
32 +log.setLevel(logging.WARNING)
33
34 def nodeid(node):
35 """Given a node, tries to return a way to see where it was in the
36 @@ -23,4 +24,4 @@
37 if node.source: fname=str(node.source)
38 except:
39 pass
40 - return 'near line %s in file %s'%(line,fname)
41 \ No newline at end of file
42 + return 'near line %s in file %s'%(line,fname)