From 63f6f99caa11896e5b48f1abe886e5267b9417b5 Mon Sep 17 00:00:00 2001 From: grglcy Date: Sat, 12 Jul 2025 13:14:44 +0100 Subject: [PATCH] don't create new log --- src/layers/layer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/layers/layer.py b/src/layers/layer.py index 6ee484d..ec01c3f 100644 --- a/src/layers/layer.py +++ b/src/layers/layer.py @@ -1,14 +1,14 @@ from abc import ABC, abstractmethod from dir import Root from log import Log, LogCat -from pathlib import Path class Layer(ABC): - def __init__(self, log_path: Path, log_category: str): - self.log_path = log_path - self.__log = Log(log_path) - self.log = LogCat(self.__log.queue, log_category) + def __init__(self, log: Log, log_category: str): + self.log = LogCat(log.queue, log_category) + + def process(self, root: Root): + self._process(root) @abstractmethod - def __process(self, root: Root): + def _process(self, root: Root): raise NotImplementedError \ No newline at end of file