mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-07 00:17:37 +08:00
print_output defaults to debug level
This commit is contained in:
+8
-5
@@ -4,6 +4,7 @@ import hmac
|
|||||||
import imp
|
import imp
|
||||||
import importlib
|
import importlib
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
@@ -382,9 +383,9 @@ def print_output(output):
|
|||||||
if not output:
|
if not output:
|
||||||
return
|
return
|
||||||
|
|
||||||
print("\n================== Output ==================")
|
content = "\n================== Output ==================\n"
|
||||||
print('{:<16}: {:<}'.format("Variable", "Value"))
|
content += '{:<16}: {:<}\n'.format("Variable", "Value")
|
||||||
print('{:<16}: {:<}'.format("--------", "-----"))
|
content += '{:<16}: {:<}\n'.format("--------", "-----")
|
||||||
|
|
||||||
for variable, value in output.items():
|
for variable, value in output.items():
|
||||||
|
|
||||||
@@ -394,6 +395,8 @@ def print_output(output):
|
|||||||
if isinstance(value, unicode):
|
if isinstance(value, unicode):
|
||||||
value = value.encode("utf-8")
|
value = value.encode("utf-8")
|
||||||
|
|
||||||
print('{:<16}: {:<}'.format(variable, value))
|
content += '{:<16}: {:<}\n'.format(variable, value)
|
||||||
|
|
||||||
print("============================================\n")
|
content += "============================================\n"
|
||||||
|
|
||||||
|
logging.debug(content)
|
||||||
|
|||||||
Reference in New Issue
Block a user