From b69ebd89f332af45956cecdf2c16facbb3766ebc Mon Sep 17 00:00:00 2001 From: Sunao Hara Date: Sat, 7 Sep 2024 20:03:15 +0900 Subject: [PATCH] Append debug lines for build commands --- jupyterlab_latex/build.py | 5 +++++ jupyterlab_latex/synctex.py | 1 + 2 files changed, 6 insertions(+) diff --git a/jupyterlab_latex/build.py b/jupyterlab_latex/build.py index 29c3668..713340d 100644 --- a/jupyterlab_latex/build.py +++ b/jupyterlab_latex/build.py @@ -162,6 +162,8 @@ def run_latex(self, command_sequence): """ for cmd in command_sequence: + self.log.debug(f'jupyterlab-latex: run: {" ".join(cmd)} (CWD: {os.getcwd()})') + code, output = yield run_command(cmd) if code != 0: self.set_status(500) @@ -183,6 +185,9 @@ def get(self, path = ''): tex_base_name, ext = os.path.splitext(os.path.basename(tex_file_path)) c = LatexConfig(config=self.config) + self.log.debug((f"jupyterlab-latex: get: path=({path}), " + f"CWD=({os.getcwd()}), root_dir=({self.serverapp.root_dir})")) + if not os.path.exists(tex_file_path): self.set_status(403) out = f"Request cannot be completed; no file at `{tex_file_path}`." diff --git a/jupyterlab_latex/synctex.py b/jupyterlab_latex/synctex.py index 557e353..72f62e8 100644 --- a/jupyterlab_latex/synctex.py +++ b/jupyterlab_latex/synctex.py @@ -145,6 +145,7 @@ def run_synctex(self, cmd): there. """ + self.log.debug(f'jupyterlab-latex: run: {" ".join(cmd)} (CWD: {os.getcwd()})') code, output = yield run_command(cmd) if code != 0: self.set_status(500)