[PATCH v2 3/3] dts: Improve logging for interactive shells

Juraj Linkeš juraj.linkes at pantheon.tech
Mon May 13 17:02:55 CEST 2024


Good idea. And again, with the one minor point below,
Reviewed-by: Juraj Linkeš <juraj.linkes at pantheon.tech>

> diff --git a/dts/framework/remote_session/interactive_shell.py b/dts/framework/remote_session/interactive_shell.py
> index 0b0ccdb545..eb9c9b6843 100644
> --- a/dts/framework/remote_session/interactive_shell.py
> +++ b/dts/framework/remote_session/interactive_shell.py

> @@ -91,7 +92,7 @@ def __init__(
>          self._stdout = self._ssh_channel.makefile("r")
>          self._ssh_channel.settimeout(timeout)
>          self._ssh_channel.set_combine_stderr(True)  # combines stdout and stderr streams
> -        self._logger = logger
> +        self._logger = get_dts_logger(f"{interactive_session._node_config.name}.{name}")

We should make interactive_session._node_config public since we're
referencing it outside the class.

>          self._timeout = timeout
>          self._app_args = app_args
>          self._start_application(get_privileged_command)


More information about the dev mailing list