MCPcopy Create free account
hub / github.com/StackStorm/st2 / get_logger

Method get_logger

st2tests/st2tests/mocks/sensor.py:64–72  ·  view source on GitHub ↗

Return mock logger instance. Keep in mind that this method returns Mock class instance which means you can use all the usual Mock class methods to assert that a particular message has been logged / logger has been called with particular arguments.

(self, name)

Source from the content-addressed store, hash-verified

62 return self._datastore_service
63
64 def get_logger(self, name):
65 """
66 Return mock logger instance.
67
68 Keep in mind that this method returns Mock class instance which means you can use all the
69 usual Mock class methods to assert that a particular message has been logged / logger has
70 been called with particular arguments.
71 """
72 return self._logger
73
74 def dispatch(self, trigger, payload=None, trace_tag=None):
75 trace_context = TraceContext(trace_tag=trace_tag) if trace_tag else None

Callers 5

__init__Method · 0.45
__init__Method · 0.45
setupMethod · 0.45
__init__Method · 0.45
test_get_loggerMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_get_loggerMethod · 0.36