HH-39153 improve logging of XSLT and failed _parse_response #84

Merged
merged 1 commit into from Dec 23, 2013

Projects

None yet

2 participants

@SuminAndrew
Member

No description provided.

@SuminAndrew SuminAndrew commented on the diff Dec 18, 2013
frontik/debug.xsl
@@ -96,7 +96,7 @@
<div class="textentry">
<div class="textentry__head {$highlight} {$loglevel}">
- <span>
+ <span class="textentry__head__message">
SuminAndrew
SuminAndrew Dec 18, 2013 Member

Чтобы сохранялись отступы всякие в сообщениях

katraev
katraev Dec 18, 2013 Contributor

понятно

@SuminAndrew SuminAndrew commented on the diff Dec 18, 2013
frontik/handler.py
@@ -406,7 +406,7 @@ def _parse_response(self, placeholder, callback, response, parse_response=True):
content_type = response.headers.get('Content-Type', '')
for k, v in default_request_types.iteritems():
if k.search(content_type):
- good_result, data = v(response)
+ good_result, data = v(response, logger=self.log)
SuminAndrew
SuminAndrew Dec 18, 2013 Member

Чтоб в per-request логгер и в дебаг-режим попадало

katraev
katraev Dec 18, 2013 Contributor

ок

@SuminAndrew SuminAndrew commented on the diff Dec 18, 2013
frontik/xsl_producer.py
raise exception
+ def get_xsl_log():
+ xsl_line = 'XSLT {0.level_name} in file "{0.filename}", line {0.line}, column {0.column}\n\t{0.message}'
+ return '\n'.join(map(xsl_line.format, self.transform.error_log))
+
SuminAndrew
SuminAndrew Dec 18, 2013 Member

Чтоб подробней логи были

katraev
katraev Dec 18, 2013 Contributor

одобряю

@SuminAndrew SuminAndrew merged commit bda5124 into master Dec 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment