mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
creators have logger
This commit is contained in:
parent
94bb9f38a3
commit
d0e9080b3b
1 changed files with 10 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import copy
|
||||
import logging
|
||||
import collections
|
||||
from uuid import uuid4
|
||||
|
||||
|
|
@ -87,6 +88,9 @@ class BaseCreator:
|
|||
to `self` if it's not Plugin specific.
|
||||
"""
|
||||
|
||||
# Variable to store logger
|
||||
_log = None
|
||||
|
||||
# Creator is enabled (Probably does not have reason of existence?)
|
||||
enabled = True
|
||||
|
||||
|
|
@ -104,6 +108,12 @@ class BaseCreator:
|
|||
"""Family that plugin represents."""
|
||||
pass
|
||||
|
||||
@property
|
||||
def log(self):
|
||||
if self._log is None:
|
||||
self._log = logging.getLogger(self.__class__.__name__)
|
||||
return self._log
|
||||
|
||||
@abstractmethod
|
||||
def create(self, options=None):
|
||||
"""Create new instance.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue