testing html debugging

workspace
Brendan Howell 3 years ago
parent 1e8211b9f4
commit c08cde0226

@ -473,6 +473,8 @@ class Bureau(object):
html_rendered = weasyprint.HTML(url_fetcher=slowfetch,
string=templ.render_unicode(**kwargs))
print("log level:", str(self.log.getEffectiveLevel()))
print("config:", self.config)
if self.log.getEffectiveLevel() == logging.DEBUG:
with open("/tmp/debug.html", "w") as html_out:
html_out.write(templ.render_unicode(**kwargs))

Loading…
Cancel
Save