mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added logger to HostImplementation
This commit is contained in:
parent
7f106cad33
commit
7ac1b6cadc
1 changed files with 9 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
import contextlib
|
||||
from abc import ABCMeta, abstractproperty, abstractmethod
|
||||
import six
|
||||
|
|
@ -55,6 +56,8 @@ class HostImplementation(object):
|
|||
functionality and responsibility will be added.
|
||||
"""
|
||||
|
||||
_log = None
|
||||
|
||||
def __init__(self):
|
||||
"""Initialization of host.
|
||||
|
||||
|
|
@ -70,6 +73,12 @@ class HostImplementation(object):
|
|||
|
||||
pass
|
||||
|
||||
@property
|
||||
def log(self):
|
||||
if self._log is None:
|
||||
self._log = logging.getLogger(self.__class__.__name__)
|
||||
return self._log
|
||||
|
||||
@abstractproperty
|
||||
def name(self):
|
||||
"""Host implementation name."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue