tamaki.mes.utils.logDebCallingFunction
Description
A decorator that wraps a function so its entry and exit are logged under the DBFunctionCalled
logger. The wrapper logs before calling the wrapped function and again after it returns, then returns
the wrapped function's result. Apply it as a decorator to any function you want traced.
Syntax
tamaki.mes.utils.logDebCallingFunction(func)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
func | Function | False | The function to wrap. |
Returns
A Function: the wrapped function that logs around the original call.
Code Examples
@tamaki.mes.utils.logDebCallingFunction
def loadData(locationId):
return system.mes.location.getLocation(locationId)
# Calling loadData(...) now logs entry and exit under 'DBFunctionCalled'