Skip to content

Commit

Permalink
Include debug logging in Robot log.html (#148)
Browse files Browse the repository at this point in the history
* Include debug logging in Robot log.html
  • Loading branch information
JFoederer committed Aug 2, 2023
1 parent f386051 commit 57cdbc3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/robotkernel/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import types
import uuid

LOGLEVEL = "DEBUG:INFO"


def execute_python(kernel: DisplayKernel, code: str, module: str, silent: bool):
"""Execute Python code str in the context of named module.
Expand Down Expand Up @@ -275,7 +277,12 @@ def run_robot_suite(
if progress is not None:
sys.__stdout__ = progress
try:
results = suite.run(outputdir=path, stdout=stdout, listener=listeners)
results = suite.run(
outputdir=path,
stdout=stdout,
listener=listeners,
loglevel=LOGLEVEL,
)
finally:
if progress is not None:
sys.__stdout__ = progress.stdout
Expand Down Expand Up @@ -314,6 +321,7 @@ def run_robot_suite(
log=os.path.join(path, "log.html"),
report=os.path.join(path, "report.html"),
rpa=getattr(suite, "rpa", False),
loglevel=LOGLEVEL,
)

with open(os.path.join(path, "log.html"), "rb") as fp:
Expand Down

0 comments on commit 57cdbc3

Please sign in to comment.