From bbd5d8a1a10e96a43f6deaa6a425623707b7ac9e Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 18 Apr 2022 19:34:36 -0400 Subject: [PATCH] history: add logging Signed-off-by: Eric Callahan --- moonraker/components/history.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/moonraker/components/history.py b/moonraker/components/history.py index 57205b6..c48bc43 100644 --- a/moonraker/components/history.py +++ b/moonraker/components/history.py @@ -4,6 +4,7 @@ from __future__ import annotations import time +import logging from asyncio import Lock # Annotation imports @@ -246,6 +247,9 @@ class History: self.history_ns[job_id] = job.get_stats() self.cached_job_ids.append(job_id) self.next_job_id += 1 + logging.debug( + f"History Job Added - Id: {job_id}, File: {job.filename}" + ) self.send_history_event("added") def delete_job(self, job_id: Union[int, str]) -> None: @@ -272,6 +276,11 @@ class History: self.grab_job_metadata() self.save_current_job() self._update_job_totals() + logging.debug( + f"History Job Finished - Id: {self.current_job_id}, " + f"File: {self.current_job.filename}, " + f"Status: {status}" + ) self.send_history_event("finished") self.current_job = None self.current_job_id = None