added logger to action plugin

This commit is contained in:
Jakub Trllo 2025-08-21 13:54:38 +02:00
parent 599716fe94
commit 7b81cb1215

View file

@ -3,6 +3,7 @@ from __future__ import annotations
import os
import collections
import copy
import logging
from abc import ABC, abstractmethod
from typing import Optional, Any, Callable
from dataclasses import dataclass
@ -377,6 +378,8 @@ class LoaderActionPlugin(ABC):
"""
_log: Optional[logging.Logger] = None
def __init__(self, studio_settings: dict[str, Any]):
self.apply_settings(studio_settings)
@ -389,6 +392,12 @@ class LoaderActionPlugin(ABC):
"""
pass
@property
def log(self) -> logging.Logger:
if self._log is None:
self._log = Logger.get_logger(self.__class__.__name__)
return self._log
@property
def identifier(self) -> str:
"""Identifier of the plugin.