From 7b81cb1215e900637593c26aa4213db11e6dc038 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:54:38 +0200 Subject: [PATCH] added logger to action plugin --- client/ayon_core/pipeline/actions/loader.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/ayon_core/pipeline/actions/loader.py b/client/ayon_core/pipeline/actions/loader.py index 33f48b195c..b81b89a56a 100644 --- a/client/ayon_core/pipeline/actions/loader.py +++ b/client/ayon_core/pipeline/actions/loader.py @@ -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.