Si vous constatez la perte de tickets, de commentaires ou de projets, veuillez consulter la page https://status.framasoft.org/incident/626.

Commit 0e10df28 authored by Christophe Benz's avatar Christophe Benz

Enhance debug log

parent d3c24c84
......@@ -366,10 +366,12 @@ def node_to_python_source(node, parenthesised=False):
)
raise NotImplementedError(error_message)
nb_prefix_chars = len('DEBUG:' + script_name) + 1
node_str = textwrap.indent(
json.dumps(node, indent=4),
prefix='>' * nb_prefix_chars + ' ' * deep_level * 4,
)[nb_prefix_chars:].lstrip()
transpilation_function_short_name = transpilation_function_name[:-len('to_python_source') - 1]
prefix = '> {}{}'.format(
transpilation_function_short_name + ' ' * (nb_prefix_chars - len(transpilation_function_short_name) - 3) + ':',
' ' * deep_level * 4,
)
node_str = textwrap.indent(json.dumps(node, indent=4), prefix=prefix)[nb_prefix_chars:].lstrip()
log.debug(
'{}{}({})'.format(
' ' * deep_level * 4 + '={}=> '.format(deep_level),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment