Skip to content

Commit

Permalink
feat(executor): add self logger to executor (#4818)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed May 23, 2022
1 parent aa2d7c8 commit 9c1fda9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jina/serve/executors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
from jina.helper import ArgNamespace, T, iscoroutinefunction, typename
from jina.importer import ImportExtensions
from jina.jaml import JAML, JAMLCompatible, env_var_regex, internal_var_regex
from jina.logging.logger import JinaLogger
from jina.serve.executors.decorators import requests, store_init_kwargs, wrap_func

if TYPE_CHECKING:
from docarray import DocumentArray
from prometheus_client import Summary

from docarray import DocumentArray

__all__ = ['BaseExecutor', 'ReducerExecutor']


Expand Down Expand Up @@ -107,6 +109,7 @@ def __init__(
self._add_requests(requests)
self._add_runtime_args(runtime_args)
self._init_monitoring()
self.logger = JinaLogger(self.__class__.__name__)

def _add_runtime_args(self, _runtime_args: Optional[Dict]):
if _runtime_args:
Expand Down

0 comments on commit 9c1fda9

Please sign in to comment.