mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
logger is created dynamically on demand and is using class name
This commit is contained in:
parent
6462bf15d0
commit
5dfb12a217
1 changed files with 7 additions and 2 deletions
|
|
@ -72,6 +72,7 @@ class AbstractTemplateLoader:
|
|||
"""
|
||||
|
||||
def __init__(self, placeholder_class):
|
||||
self._log = None
|
||||
|
||||
self.loaders_by_name = get_loaders_by_name()
|
||||
self.current_asset = legacy_io.Session["AVALON_ASSET"]
|
||||
|
|
@ -91,8 +92,6 @@ class AbstractTemplateLoader:
|
|||
.get("type")
|
||||
)
|
||||
|
||||
self.log = Logger().get_logger("BUILD TEMPLATE")
|
||||
|
||||
self.log.info(
|
||||
"BUILDING ASSET FROM TEMPLATE :\n"
|
||||
"Starting templated build for {asset} in {project}\n\n"
|
||||
|
|
@ -112,6 +111,12 @@ class AbstractTemplateLoader:
|
|||
"There is no registered loaders. No assets will be loaded")
|
||||
return
|
||||
|
||||
@property
|
||||
def log(self):
|
||||
if self._log is None:
|
||||
self._log = Logger.get_logger(self.__class__.__name__)
|
||||
return self._log
|
||||
|
||||
def template_already_imported(self, err_msg):
|
||||
"""In case template was already loaded.
|
||||
Raise the error as a default action.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue